Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crnlib: do not call sem_destroy on macOS
On macOS, sem_unlink should be used instead of sem_destroy, what the current code does is to call sem_destroy on every pthread-compatible system and then call sem_unlink on macOS. It is expected the only macOS implementation of it and other functions like sem_init is to do nothing but to exist and be marked as deprecated so the compiler can print warnings as the -Wdeprecated-declarations flag is enabled by default. Because sem_destroy is expected to be a stub on macOS and we call sem_unlink anyway, the current code works but raises a “'sem_destroy' is deprecated” warning at build time for something we don't need and we already have the right implementation done anyway.
- Loading branch information