[m-rev.] for post-commit review: isolate all dependencies on POSIX unnamed semaphores
paul at bone.id.au
Thu Sep 29 14:16:25 AEST 2016
On Thu, Sep 29, 2016 at 02:00:02PM +1000, Julien Fischer wrote:
> For post-commit review by Paul or Peter.
> Isolate all dependencies on POSIX unnamed semaphores.
> Isolate all dependencies on POSIX unnamed semaphores to the runtime's
> mercury_thread module. This is a step towards fixing bug #357.
> Provide wrappers for the functions sem_destroy and sem_timedwait.
> The latter does not exist on OS X, so (for now) just abort if it
> is called.
I was a little confused while reading the diff. There are actually two
wrappers for sem_timedwait, the C function and the macro. But only one
wrapper for the other calls. Making this clearer in the log message would
have made reading the diff slightly less confusing.
> Use the above wrappers instead of calling the sem_* functions
The change itself is fine.
I also commented on this issue in the bug tracker. The most important
details is probably that I remember choosing semaphores for this code in
particular for very specific reasons, I just don't remember exactly what
those reasons are.
More information about the reviews