[libdispatch-dev] [PATCH 09/17] portability
Paolo Bonzini
bonzini at gnu.org
Fri Oct 30 11:18:22 PDT 2009
On 10/30/2009 07:14 PM, Kevin Van Vechten wrote:
> Based on the above discussion it seems like we may need to make
> dispatch_semaphore_t be a thinner wrapper around OS semaphores on
> platforms where the semaphore's handle cannot be atomically exchanged
> — i.e. we may need to forgo the optimization of lazily allocating the
> OS semaphore.
Yep. OTOH, on Linux you'd probably want to use futexes which perform
the same optimization (if you don't do the system call, the futex is
just an "int"). So long-term some of these wrappers would move into
src/shims.
Let's just leave aside this fix.
Paolo
More information about the libdispatch-dev
mailing list