Re: [linux-audio-dev] sysv semaphores instead of pipes

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] sysv semaphores instead of pipes
From: Peter Hanappe (peter_AT_hanappe.com)
Date: Tue Jun 26 2001 - 19:27:11 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Jun 26 2001 - 20:21:57 EEST