Re: Max value of semaphore
Re: Max value of semaphore
- Subject: Re: Max value of semaphore
- From: Terry Lambert <email@hidden>
- Date: Tue, 16 Dec 2008 00:43:10 -0800
On Dec 11, 2008, at 12:57 AM, Rakesh Singhal wrote:
Hi all
I am creating a semaphore using ftok, semget and then initializing. I
want to change the maximum value of semaphore. I think the variable is
semvmx and its value is around 32767 and I want to keep it is 3 in my
case so please suggest me how to do it.
System V semaphores have a maximum value of an unsigned short, but the
semundo is a signed short, so for resource tracking purposes, the
maximum value is 32767, since that the most that can be subtracted out
a once as a result of executing cleanup code on a process death. The
aggregate value is max 65535, but that assumes that you don't
increment it more than 32767 total in a given process.
Unfortunately, we can't change this without damaging binary and some
source compatibility.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden