Origins of nameless semaphores and Apple's non-support thereof

Chris Hanson cmhanson at eschatologist.net
Tue Jun 25 21:42:50 CDT 2019


On Jun 25, 2019, at 5:39 PM, David Griffith via cctalk <cctalk at classiccmp.org> wrote:
> 
> I recently tripped over the fact that MacOS does not support nameless POSIX semaphores.  When attempting to use them, I get a complaint that they're deprecated.  I can't fathom why Apple would do that.  I found this post explaining it, albeit not very well: https://lists.apple.com/archives/darwin-kernel/2009/Apr/msg00010.html. It seems that Apple yanked out support, but elsewhere (https://intfiction.org/t/macos-frotz-users/41553/5) I'm told that Apple did it because BSD 4.4 didn't implement them.  I was fairly sure that it did.  Does anyone have a more satisfying answer?

What do you find incorrect or insufficient about Terry’s explanation in that email to the darwin-kernel list? 

I get that you would like POSIX unnamed semaphores but they aren’t required for conformance and there are specific issues (that Terry relates) that really would have made them difficult to implement in a way that’s both compatible with how they’re used in practice (e.g. casting to pointers and sticking them in shared memory region) and maintaining binary compatibility (a decade’s worth of shipping software at that point that expects sem_t to be a 32-bit type).

  -- Chris



More information about the cctalk mailing list