Am Dienstag, 19. April 2011 schrieb Alexandre Julliard:
Wolfgang Walter wolfgang.walter@stwm.de writes:
So this is my theorie:
wait_on() is called.
wait_on() calls RtlQueueWorkItem(wait_for_event, commio, 0 /* FIXME */) and returns with STATUS_PENDING
wait_for_event() finishes and sets iosb before io_control() continues
io_control sets iosb to STATUS_PENDING
The last one is a bug. iosb should only be set once we have a result. Check how the other async I/O functions do it.
It is done similar elsewhere when getting asynchron, i.e.
in dlls/ws2_32/socket.c: WS2_ConnectEx():
or dlls/kernel32/file.c: WriteFile()
* set iosb to STATUS_PENDING, * call function * if it returns with STATUS_PENDING don't touch iosb.
Regards,