File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ _dispatch_lock_has_failed_trylock(dispatch_lock lock_value)
8989
9090#elif defined(__linux__ )
9191#include <linux/futex.h>
92- #if !defined(__x86_64__ ) && !defined(__i386__ )
92+ #if !defined(__x86_64__ ) && !defined(__i386__ ) && !defined( __s390x__ )
9393#include <linux/membarrier.h>
9494#endif
9595#include <unistd.h>
@@ -542,8 +542,9 @@ DISPATCH_ALWAYS_INLINE
542542static inline dispatch_once_t
543543_dispatch_once_xchg_done (dispatch_once_t * pred )
544544{
545- #if defined(__i386__ ) || defined(__x86_64__ )
545+ #if defined(__i386__ ) || defined(__x86_64__ ) || defined( __s390x__ )
546546 // On Intel, any load is a load-acquire, so we don't need to be fancy
547+ // same for s390x
547548 return os_atomic_xchg (pred , DLOCK_ONCE_DONE , release );
548549#elif defined(__linux__ )
549550 if (unlikely (syscall (__NR_membarrier , MEMBARRIER_CMD_SHARED , 0 ) < 0 )) {
You can’t perform that action at this time.
0 commit comments