Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite sem_* interface with GCD semaphore on macOS #37

Merged
merged 1 commit into from
Mar 25, 2018

Conversation

jserv
Copy link
Member

@jserv jserv commented Mar 25, 2018

sem_init(), sem_post(), sem_wait(), etc. are deprecated on macOS.

To summarize the points of why macOS deprecated these:

  • Appendix 9 of the Single UNIX Specification states they are not
    mandatory interfaces
  • "Most portable code" uses SYSV semaphores
  • Backwards compatibility with POSIX named semaphores, which share
    the sem_t type is difficult

GCD semaphore is the only native unnamed semaphore interface available
on macOS.

sem_init(), sem_post(), sem_wait(), etc. are deprecated on macOS.

To summarize the points of why macOS deprecated these:
  * Appendix 9 of the Single UNIX Specification states they are not
    mandatory interfaces
  * "Most portable code" uses SYSV semaphores
  * Backwards compatibility with POSIX named semaphores, which share
    the sem_t type is difficult

GCD semaphore is the only native unnamed semaphore interface available
on macOS.
@furuame furuame merged commit 7058eeb into DLTcollab:dev Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants