commit | d12b661c13b90813e73aeb402d240b04b2d84dec | [log] [tgz] |
---|---|---|
author | Dan Talayco <dtalayco@stanford.edu> | Sun Mar 07 22:00:46 2010 -0800 |
committer | Dan Talayco <dtalayco@stanford.edu> | Sun Mar 07 22:00:46 2010 -0800 |
tree | 7941c4c3c9369e2dfa2b8bd3eff5cced737a20b3 | |
parent | 1a88c12344b8e76a1a7a620809bcc61abafb3db6 [diff] |
Fixed race condition It's possible that a packet is being processed when poll() is called, but that it has not been enqueued yet. If poll gets control, it checks the queue and then sleeps if it can't find it's packet. But if the check to notify poll has already taken place, the intended packet is enqueued after poll has checked for it. Fix this by extending the period that the packet processing routine holds the mutex.