Fix semaphore deadlock on Apple Silicon

This commit is contained in:
Justine Tunney 2023-10-03 09:26:46 -07:00
parent e8ecf31ad5
commit ee8a861635
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -114,7 +114,7 @@ errno_t nsync_mu_semaphore_p_with_deadline_gcd (nsync_semaphore *s,
!_weaken (pthread_testcancel_np) ||
!(pt = _pthread_self()) ||
(pt->pt_flags & PT_NOCANCEL)) {
nsync_dispatch_semaphore_wait (s, abs_deadline);
result = nsync_dispatch_semaphore_wait (s, abs_deadline);
} else {
struct timespec now, until, slice;
slice = timespec_frommillis (__SIG_LOCK_INTERVAL_MS);