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