I'm reviving some old code, dates back to 2010. In one place I see I have replaced use of pthread_mutexes with sem_wait() and sem_post() (posix semaphores). I just can't see why I did it. :-(
The semantics are slightly different, but can anyone suggest why one should use one over the other? (or vice versa).