Home
last modified time | relevance | path

Searched refs:futex (Results 1 – 11 of 11) sorted by relevance

/llvm-project/libc/src/__support/threads/linux/
H A Draw_mutex.h41 Futex futex;
50 result = futex.load(cpp::MemoryOrder::RELAXED); in spin()
71 futex.compare_exchange_strong(state, LOCKED, cpp::MemoryOrder::ACQUIRE, in lock_slow()
83 futex.exchange(IN_CONTENTION, cpp::MemoryOrder::ACQUIRE) == UNLOCKED) in lock_slow()
86 if (ETIMEDOUT == -futex.wait(IN_CONTENTION, timeout, is_pshared)) in lock_slow()
93 LIBC_INLINE void wake(bool is_pshared) { futex.notify_one(is_pshared); }
96 LIBC_INLINE static void init(RawMutex *mutex) { mutex->futex = UNLOCKED; }
97 LIBC_INLINE constexpr RawMutex() : futex(UNLOCKED) {} in init()
101 return futex.compare_exchange_strong( in try_lock()
114 FutexWordType prev = futex
[all...]
/llvm-project/compiler-rt/test/tsan/Linux/
H A Dsignal_in_futex_wait.cpp17 int futex(int *uaddr, int futex_op, int val, const struct timespec *timeout, in futex() function
36 int r = futex(&value, FUTEX_WAIT_PRIVATE, 1, nullptr, nullptr, 0); in lock()
46 int r = futex(&value, FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0); in unlock()
/llvm-project/openmp/runtime/src/
H A Dkmp_csupport.cpp1222 // Fast-path acquire futex lock
1231 &(ftx->lk.poll), KMP_LOCK_FREE(futex), \
1232 KMP_LOCK_BUSY(gtid_code, futex))) != KMP_LOCK_FREE(futex)) { \
1237 KMP_LOCK_BUSY(1, futex))) { \
1240 poll_val |= KMP_LOCK_BUSY(1, futex); \
1252 // Fast-path test futex lock
1256 if (KMP_COMPARE_AND_STORE_ACQ32(&(ftx->lk.poll), KMP_LOCK_FREE(futex), \
1257 KMP_LOCK_BUSY(gtid + 1 << 1, futex))) { \
1265 // Fast-path release futex loc
[all...]
H A Dkmp_lock.cpp339 &(lck->lk.poll), KMP_LOCK_FREE(futex), in __kmp_acquire_futex_lock_timed_template()
340 KMP_LOCK_BUSY(gtid_code, futex))) != KMP_LOCK_FREE(futex)) { in __kmp_acquire_futex_lock_timed_template()
358 poll_val | KMP_LOCK_BUSY(1, futex))) { in __kmp_acquire_futex_lock_timed_template()
365 poll_val |= KMP_LOCK_BUSY(1, futex); in __kmp_acquire_futex_lock_timed_template()
420 if (KMP_COMPARE_AND_STORE_ACQ32(&(lck->lk.poll), KMP_LOCK_FREE(futex), in __kmp_test_futex_lock()
421 KMP_LOCK_BUSY((gtid + 1) << 1, futex))) { in __kmp_test_futex_lock()
446 kmp_int32 poll_val = KMP_XCHG_FIXED32(&(lck->lk.poll), KMP_LOCK_FREE(futex)); in __kmp_release_futex_lock()
456 syscall(__NR_futex, &(lck->lk.poll), FUTEX_WAKE, KMP_LOCK_BUSY(1, futex), in __kmp_release_futex_lock()
488 TCW_4(lck->lk.poll, KMP_LOCK_FREE(futex)); in __kmp_init_futex_lock()
3621 KMP_BIND_USER_LOCK_WITH_CHECKS(futex); in __kmp_set_user_lock_vptrs()
[all …]
H A Dkmp_lock.h208 { KMP_LOCK_FREE(futex), 0 } \
612 kmp_futex_lock_t futex; member
1053 #define KMP_FOREACH_D_LOCK(m, a) m(tas, a) m(futex, a) m(hle, a) m(rtm_spin, a)
1068 #define KMP_FOREACH_D_LOCK(m, a) m(tas, a) m(futex, a)
H A Dkmp_settings.cpp4714 KMP_STORE_LOCK_SEQ(futex); in __kmp_stg_parse_lock_kind()
/llvm-project/libcxxabi/src/
H A Dcxa_guard_impl.h50 # if __has_include(<sys/futex.h>)
51 # include <sys/futex.h>
420 futex(reinterpret_cast<volatile uint32_t*>(addr), WAIT, expect, NULL, NULL); in PlatformFutexWait()
426 futex(reinterpret_cast<volatile uint32_t*>(addr), WAKE, INT_MAX, NULL, NULL); in PlatformFutexWake()
446 /// InitByteFutex - Uses a futex to manage reads and writes to the init byte.
520 /// Use the futex to wait on the current guard variable. Futex expects a
539 /// Create the expected integer value for futex `wait(int* addr, int expected)`.
625 /// FutexGuard - Manages initialization using atomics and the futex syscall for
663 // TODO(EricWF): We should prefer the futex implementation when available. But
/llvm-project/libcxx/src/
H A Datomic.cpp19 # include <linux/futex.h>
39 # include <sys/futex.h>
42 # define _LIBCPP_FUTEX(...) futex(__VA_ARGS__)
/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_linux.cpp126 // <linux/futex.h> is broken on some linux distributions.
802 sched_yield(); /* No userspace futex-like synchronization */ in internal_prctl()
804 internal_syscall(SYSCALL(futex), (uptr)p, FUTEX_WAIT_PRIVATE, cmp, 0, 0, 0);
812 /* No userspace futex-like synchronization */ in internal_sigaltstack()
814 internal_syscall(SYSCALL(futex), (uptr)p, FUTEX_WAKE_PRIVATE, count, 0, 0, 0); in internal_sigaltstack()
H A Dsanitizer_common_syscalls.inc3197 PRE_SYSCALL(futex)
3202 POST_SYSCALL(futex)
/llvm-project/openmp/runtime/src/i18n/
H A Den_US.txt426 FutexNotSupported "futex system call not supported; %1$s=%2$s ignored."