Bishnupriya,
I believe it might have been you who wrote the following, possibly (if my
memory is correct) in response to some issues raised by David:
-----
The term "number of keys" should be defined upfront as the permitted
number of concurrent accesses to the semaphore, specified when
constructing the semaphore.
post()
If the semaphore value is equal to the number of keys (i.e. the semaphore
is unlocked), member function post() shall return the value -1.
If the semaphore was not locked by the calling function (via a wait() or
trywait() call), member function post() shall return the value -1.
If the semaphore was locked by the calling process, member function post
shall increment the semaphore value, and return the value 0. If processes
exist that are suspended and are waiting for the semaphore value to be
incremented, exactly one of these processes shall be permitted to
decrement the semaphore value (the choice of process instance being
nondeterministic) while the remaining processes shall suspend again. This
shall be accomplished within a single evaluation phase; that is, an
implementation shall use immediate notification to signal the act
incrementing the semaphore value to any waiting processes.
-----
Do you still stand by this?
Thanks,
John A
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Nov 24 06:20:37 2010
This archive was generated by hypermail 2.1.8 : Wed Nov 24 2010 - 06:20:38 PST