File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -548,7 +548,17 @@ _dispatch_once_xchg_done(dispatch_once_t *pred)
548
548
return os_atomic_xchg (pred , DLOCK_ONCE_DONE , release );
549
549
#elif defined(__linux__ )
550
550
if (unlikely (syscall (__NR_membarrier , MEMBARRIER_CMD_SHARED , 0 ) < 0 )) {
551
- DISPATCH_INTERNAL_CRASH (errno , "sys_membarrier not supported" );
551
+ /*
552
+ * sys_membarrier not supported
553
+ *
554
+ * Ideally we would call DISPATCH_INTERNAL_CRASH() here, but
555
+ * due to ordering constraints in internal.h required by Darwin
556
+ * the macro is undefined when this header is included.
557
+ * Instead, open-code what would be a call to
558
+ * _dispatch_hardware_crash() inside DISPATCH_INTERNAL_CRASH().
559
+ */
560
+ __asm__("" );
561
+ __builtin_trap ();
552
562
}
553
563
return os_atomic_xchg (pred , DLOCK_ONCE_DONE , relaxed );
554
564
#else
You can’t perform that action at this time.
0 commit comments