[fpc-pascal] Semaphore problems
JeLlyFish.software at gmx.net
Mon Jul 24 19:22:50 CEST 2006
Burkhard Carstens wrote:
> Am Montag, 24. Juli 2006 17:27 schrieb Vinzent Hoefler:
>>> - the rtlEvent works even with timeout (with my patch posted on
>>> mantis), but this one clears the signaled state, when wait is
>> *oh* Before the wait? That's not good. This cries for race conditions
>> and subtle deadlock situations.
> thread synchronization uses this and takes care of it by calling
> RTLeventstartwait which locks the associated mutex.
As far as I just read code and comments, it does it for Windows to get
Unix behaviour, although I don't see the point here, because this just
forces the race condition the POSIX-Threads implementation actually
tries to circumvent with this associated mutex.
I'm not even sure, if Unix actually clears the event. The man-pages
don't seem to indicate so.
More information about the fpc-pascal