(binary) semaphore inside tbb

(binary) semaphore inside tbb

While debugging my tbb based application I realized that tbb implements an efficient (binary semaphore) using futexes (at least on my 64bit ubuntu). I would like to swap my own not very portable futex based binary semaphore implementation by the tbb one. Sadly, the tbb 4.0 interface doesn't expose semaphore nor binary_semaphore. I cannot/do not want to use the provided condition variables as these require to lock everything in order to guarantee that the signal is not send before the receiver is waiting.
Is there a portable/future proof way to access the binary_semaphore in the current release. If not, are there any intentions to expose this useful code??

Thx,
Alex Herz

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.