Paul Davis wrote:
>> I just wanted to make sure I understood that. (I might learn something
>> here). First, I guess SysV uses semget(2), semctl(2) and semop(2) to
>> handle semaphores. Does that mean that the following code would not be
>> correct:
>>
>>
>> [ cut ]
>>
>> Do the same restrictions apply with the pthread semaphores
>> (semaphores(3), semaphore.h) or the pthread mutexes?
>
>
> No, you're on the wrong track here. The problem I was describing was
> quite different.
>
> [ cut ]
>
> ... you want to put the process to sleep until *either* the
> semaphore is ready (however you've defined that) or the file is ready
> to read.
Okay, I understood that clearly. Now I also understand the reference
you made to windows where you can "WaitForMultipleObjects" (among them
are files and semaphores).
> pthread semaphores as supported by linuxthreads are completely
> unrelated to SysV semaphores, and should never be discussed in the
> same message :)
Sorry! Won't do it again.
Peter
> --p