lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Diego Nehab wrote:
Hi,

It's not being maintained anymore for lack of interest. I did port it to 5.1 answering a couple requests, sent it out for people who asked for it to test, and never heard
back from them. Hope it didn't destroy their computers. :)

If you want to try it out, let me know and I can send it to
you.


Looking at the mini-pthreads code for win32, I skipped (as would be expected, I guess) right to pthread_cond_wait().

And after a few minutes of looking at it (and at the pthreads-win32 sources from sourceware.org[1]), I'm not convinced it's completely right. My gripe is with the unlocked reads/writes to _cond->waiting in
pthread_cond_signal().

For instance, two threads calling signal() and seeing waiting == 1 may
each call ReleaseSemaphore() and later decrement it down to -1.


Any thoughts on this would be appreciated.
Regards,
Bogdan

[1] http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/pthreads/pthread_cond_wait.c?rev=1.10&content-type=text/plain&cvsroot=pthreads-win32