On Fri, Dec 06, 2013 at 02:47:29PM -0800, Linda Sun wrote: > Signed-off-by: Linda Sun <l...@vmware.com>
Hi Linda. Thanks for sending this along so that we can start figuring out how to work Windows into the poll loop. Looking at the documentation for WaitForMultipleObjects, I see a few possible issues. One is that it looks like we add a lot of null pointers to the wevents array (most of the poll_fd_wait() calls pass NULL). I don't see documentation for what WaitForMultipleObjects does with null pointers. WaitForMultipleObjects also forbids duplicates in its handles array. OVS calls poll with duplicates sometimes. WaitForMultipleObjects documentation says: "If one of these handles is closed while the wait is still pending, the function's behavior is undefined." OVS might sometimes close a file descriptor from one thread that some other thread is waiting for, since Unix has well-defined semantics for that. I'm not sure how to audit the code for this, or what the consequences for getting it wrong are. ("Undefined" sounds bad, but what happens in practice?) Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev