On 07/09/11 17:08, Ben Greear wrote:
On 09/07/2011 03:11 AM, Steven Simpson wrote:
So, I believe the code removes the identified
event from the array, and re-calls WaitFor* to pick out the next one.
Re-calls always use a zero timeout, since an event has already fired.
That seems like a neat hack, but it's hard to believe the windows API
is so inefficient as to require all of those system calls!
Yeah, though it might be as few as:
* one call (with non-zero timeout) that identifies one event,
* the second one (with zero timeout) that reports no more events.
...regardless of the number of handles submitted.
It's also possible to use select in windows, but it only works on
sockets I think...
That was my understanding too, hence I went looking into WaitFor*.
so not sure I could add console (stdin?) to make
xorpsh work properly, so I haven't tried to enable that yet...
It ought to be possible to get the HANDLE for stdin. This looks promising:
<http://msdn.microsoft.com/en-us/library/ms685035%28v=VS.85%29.aspx>
Cheers,
Steven
--
_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers