20#include <private/qglobal_p.h>
32#if QT_CONFIG(appstore_compliant)
45extern
int __ulock_wait2(uint32_t operation,
void *
addr, uint64_t
value,
53#define UL_COMPARE_AND_WAIT 1
54#define UL_COMPARE_AND_WAIT_SHARED 3
55#define UL_COMPARE_AND_WAIT64 5
56#define UL_COMPARE_AND_WAIT64_SHARED 6
61#define ULF_WAKE_ALL 0x00000100
62#define ULF_WAKE_THREAD 0x00000200
63#define ULF_WAKE_ALLOW_NON_OWNER 0x00000400
68#define ULF_WAKE_ALL 0x00000100
69#define ULF_WAKE_THREAD 0x00000200
70#define ULF_WAKE_ALLOW_NON_OWNER 0x00000400
75#define ULF_NO_ERRNO 0x01000000
86template <
typename Atomic>
89 static_assert(
sizeof(Atomic) >=
sizeof(
quint32),
"Can only operate on 32- or 64-bit atomics");
92 if (
sizeof(Atomic) ==
sizeof(
quint32))
99template <
typename Atomic>
inline int
104 int ret = __ulock_wait2(
baseOperation(futex), &futex, uint64_t(expectedValue),
105 timer.remainingTimeNSecs(), 0);
110template <
typename Atomic>
111inline void futexWait(Atomic &futex,
typename Atomic::Type expectedValue)
113 do_wait(futex, expectedValue, {});
116template <
typename Atomic>
120 return r == 0 ||
r != -ETIMEDOUT;
Combined button and popup list for selecting options.
void futexWakeOne(Atomic &futex)
void futexWait(Atomic &futex, typename Atomic::Type expectedValue)
uint32_t baseOperation(Atomic &)
void futexWakeAll(Atomic &futex)
int do_wait(Atomic &futex, typename Atomic::Type expectedValue, QDeadlineTimer timer)
void futexRelease(void *, void *=nullptr)
void futexAcquire(void *, void *=nullptr)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
__attribute((__weak__)) extern int __ulock_wait2(uint32_t operation
void uint64_t uint64_t uint64_t value2
#define UL_COMPARE_AND_WAIT
#define UL_COMPARE_AND_WAIT64
GLbitfield GLuint64 timeout
[4]