|
Re: sem_open() and path issues
|
10/07/2009 9:30 AM
post39509
|
Re: sem_open() and path issues
On Tue, Oct 06, 2009 at 02:51:20PM -0400, Enrico Simetti wrote:
> I still have one open issue with semaphores, and that is how to have counting semaphores counting up to a specified
amount (e.g. binary semaphores) and not up to the SEM_VALUE_MAX constant. I'm either blind or there's nothing in the
docs that suggests it being possible (unless by first checking the value of the semaphore and then deciding or not to do
the sem_post() depending on its value).
POSIX decrees that its semphares are always counting. To get binary
behaviour, you need to use a mutex.
--
Brian Stecher (bstecher@qnx.com) QNX Software Systems
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8
|
|
|