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 @@ -548,7 +548,17 @@ _dispatch_once_xchg_done(dispatch_once_t *pred)
548548 return os_atomic_xchg (pred , DLOCK_ONCE_DONE , release );
549549#elif defined(__linux__ )
550550 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 ();
552562 }
553563 return os_atomic_xchg (pred , DLOCK_ONCE_DONE , relaxed );
554564#else
You can’t perform that action at this time.
0 commit comments