Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace GCD semaphores with Mach semaphores on OSX
On OSX, GCD (Grand Central Dispatch) semaphores cause issues such as hangs and crashes: 1. thrstatetest failures: eclipse-openj9/openj9#3822, eclipse-openj9/openj9#4046 2. vmRuntimeState failures: eclipse-openj9/openj9#3878 Also, GCD semaphores are not signal-safe. Mach semaphores resolve the hangs and crashes seen with GCD semaphores. Only named POSIX semaphores are available on OSX. Unnamed POSIX sempahores are not available on OSX. On OSX, named POSIX semaphores are signal safe, and they are implemented using Mach semaphores. So, it is safe to assume that Mach semaphores are signal safe. Mach semaphores can be considered as a substitute for unnamed POSIX semaphores. Thus, GCD semaphores are replaced with Mach semaphores on OSX. Fixes eclipse-openj9/openj9#3822 Fixes eclipse-openj9/openj9#3878 Fixes eclipse-openj9/openj9#4046 Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
- Loading branch information
Showing
2 changed files
with
11 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters