Le 22 oct. 2012 à 14:50, Fons Adriaensen a écrit :
On Mon, Oct 22, 2012 at 02:31:35PM +0200, Stéphane
Letz wrote:
You can use semas on OSX, you'll need to use
sem_open API instead of sem_init.
Using here: sem_open, sem_post/sem_wait, sem_unlink/sem_close with success
(In Faust Work Stealing Scheduler code). And semas are actually a slight
wrapper over Mach semas. You can check that in XNU source (here for
instance
http://opensource.apple.com/release/mac-os-x-1068/)
Except that the implementation is incomplete. And worse, some functions
such as sem_init() do exist but don't work.
I know that, so use sem_open.
Earlier versions of zita-
convolver also required sem_getvalue() which doesn't exist or doesn't
work, I don't remember.
Having to do all of: destroy a sema, create a new one in the filesystem
(which requires unique names), open then unlink the new one, just to
reset its counter to zero is too much a hack for it to be acceptable.
Ciao,
Well... your choice.
Stéphane