[ros-kernel] File IO bugs
Gunnar André Dalsnes
hardon at online.no
Sun Nov 30 00:53:00 CET 2003
I just discovered this old post...
>
> The interpretion of FO_SYNCHRONOUS_IO is possible incorrect. If
> FO_SYNCHRONOUS_IO is set and the caller supplys an event handle, the
> Ntxxxx functions should return the result from call to
> IoCallDriver and
> should not wait on the event. The caller must wait on the
> event handle.
Nt/Zw funtions allways wait on the callers behalf if FO_SYNCHRONOUS_IO is
set!
The caller may supply an event, but this is mostly useless for syncronous
operations since the function does the waiting for you. I can only think of
one
case where this is "usefull": you may wait on this event in one thread while
doing synchronous io in a different thread...
>
> It seems that the implementation for synchronous access to
> fileobject's
> is wrong. For synchronisation, the i/o-manger must use some
> fields from
> the fileobject (Waiters, Busy, LastLock, Lock).
Yes, we'll have to implement this sometime... Currently we have no
protection
agains multiple threads/processes trying to do synchronous io using the same
handle/fileobject simultaneously.
Regards,
Gunnar
More information about the Ros-kernel
mailing list