Date: Mon, 6 Apr 2015 00:07:37 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: Resuming work on new semaphore On Sun, 5 Apr 2015, Rich Felker wrote: > So if cancellation was pending _before_ the call to sem_wait, then > sem_wait has to honor it. But there is no requirement that entry to > the sem_wait function be "atomic" with becoming a waiter on the > semaphore, and of course this is impossible to satisfy or even > specify. Thanks! One other thing to consider. In the absence of concurrent operations on the semaphore, return value of sem_getvalue should be equal to the number of times sem_trywait will indicate success when called repeatedly. So if the implementation performs post-stealing in trywait, it should return the higher bound as semaphore value. Likewise for timedwait. Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.