Wineserver semantics

Alexandre Julliard julliard at winehq.com
Tue Mar 6 16:09:48 CST 2001


Waldek Hebisch <hebisch at math.uni.wroc.pl> writes:

> There is ongoing disscusion on how to seed up the wineserver. 
> So I have question concerning correctness of corrent implementation. 
> Namely, for reading or writing files I have not found any locking in 
> wineserver when issuing file descriptor to clients. On the other 
> hand the client closes file descriptor just after use, and also 
> disscusion in the group suggests that client is supposed to have 
> exclusive acces to file. So I would like to know what is the case:
> 1) client is allowd to cache the descriptor
> 2) current implementation depends on winning a race
> 3) I missed locking in wineserver

I'm not sure what you mean by 'exclusive access to the file'. If you
mean file locking then this is not implemented, so there cannot be any
race ;-) Currently the client is allowed to cache the descriptor, but
before each read/write it checks with the server that the cache is
still valid. There is a race that the handle can be modified between
the check and the actual read, this will cause either a bad handle
error or a read from the wrong file; but this is no different from
what happens under Windows if the client is manipulating handles
concurrently with a ReadFile.

-- 
Alexandre Julliard
julliard at winehq.com




More information about the wine-devel mailing list