Where are semaphores in POSIX threads?

David McCann wrote: > Jan Pechanec wrote: > > > > > > > > I have a summary of POSIX papers on threads, but there in no > > imformation about semaphores (just conditional vars, mutexes). *NO* > > pthread_semaphoreinit() etc. > > > > In some materials, there is information on sem_wait(), sem_send() (or > > sm. Like that), but is it for threads (or just processes)?

> > I think this whole discussion has digressed from Jan's original question > above. Yes, there are sem_* calls in Solaris 2.5 (and 2.4 IIRC); you > just need to link with -lposix4 or whatever to get them. But these are the > *POSIX.1b* semaphores, which are *process-based* semaphores.

They have > nothing to do with threads. > > Now what Jan wants here is semaphore calls for *POSIX.1c*, i.e. POSIX > threads.

Now, IIRC, the sem_* calls are NOT specified in POSIX.1c, but > rather their behaviour in MT programs has been clarified/refined in XPG5 > (Unix98) which allows you to use semaphores to synchronize threads and/or > ... more.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions