Subj : Re: Semaphores and pthreads To : comp.programming.threads From : Paolo Date : Tue Jan 11 2005 02:44 pm Markus Elfring wrote: >> As prev poster said - never mix sema with mutexes, unless you must :). >> Sema are good for their async safety but this is probably not of >> interest if you are threads newbie. Just keep them in mind, everyone >> needs them sometimes :). As their man page says: "This is the only >> thread synchronization function provided by POSIX threads that is >> async-signal safe." (This is from SEMAPHORES(3) manpage on Linux). > More background informations ... > pthread_cond_wait() versus sem_wait() > http://groups.google.de/groups?threadm=336DB34B.63DA%40zko.dec.com Standing on what Vitali Fridman said, posix semaphores can't go under 0 with their own counter. so i think this is the cause of my problem, right? Thank you! Paolo .