Petr Salinger, le Mon 08 Jun 2009 14:07:07 +0200, a écrit :
> Also, is sharing between ***processes*** really necessary ?
>
> Please note (man sem_init):
> The pshared argument indicates whether this semaphore is to be
> shared between the threads of a process, or between processes.
>
> It looks like sharing between ***threads of a process*** should be
> sufficient. Given it would be true, just twice change sem_init(s,1,...)
> into sem_init(s,0,...).
>
> It would also be nice if you can inform upstream about this issue.
Apparently they fixed the code: it now reads as
static void os_mutex_init(os_mutex_t *s) { sem_init(s, 0, 1); }
which indeed doesn't use process sharing. I guess
04_improve_semaphore_detection.diff can now be dropped.
Samuel
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]