File tree 1 file changed +3
-2
lines changed
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)
89
89
90
90
#elif defined(__linux__ )
91
91
#include <linux/futex.h>
92
- #if !defined(__x86_64__ ) && !defined(__i386__ )
92
+ #if !defined(__x86_64__ ) && !defined(__i386__ ) && !defined( __s390x__ )
93
93
#include <linux/membarrier.h>
94
94
#endif
95
95
#include <unistd.h>
@@ -542,8 +542,9 @@ DISPATCH_ALWAYS_INLINE
542
542
static inline dispatch_once_t
543
543
_dispatch_once_xchg_done (dispatch_once_t * pred )
544
544
{
545
- #if defined(__i386__ ) || defined(__x86_64__ )
545
+ #if defined(__i386__ ) || defined(__x86_64__ ) || defined( __s390x__ )
546
546
// On Intel, any load is a load-acquire, so we don't need to be fancy
547
+ // same for s390x
547
548
return os_atomic_xchg (pred , DLOCK_ONCE_DONE , release );
548
549
#elif defined(__linux__ )
549
550
if (unlikely (syscall (__NR_membarrier , MEMBARRIER_CMD_SHARED , 0 ) < 0 )) {
You can’t perform that action at this time.
0 commit comments