20#include <QtCore/private/qglobal_p.h>
21#include <QtCore/qnamespace.h>
22#include <QtCore/qmutex.h>
23#include <QtCore/qatomic.h>
24#include <QtCore/qdeadlinetimer.h>
26#include "qplatformdefs.h"
28#if defined(Q_OS_DARWIN)
29# include <mach/semaphore.h>
30#elif defined(Q_OS_UNIX)
31# include <semaphore.h>
46 bool wait(QDeadlineTimer timeout = QDeadlineTimer::Forever);
47 void wakeUp()
noexcept;
55 Q_ASSERT(refCount.loadRelaxed() >= 0);
58 c = refCount.loadRelaxed();
61 }
while (!refCount.testAndSetRelaxed(c, c + 1));
62 Q_ASSERT(refCount.loadRelaxed() >= 0);
67 Q_ASSERT(refCount.loadRelaxed() >= 0);
68 if (!refCount.deref())
70 Q_ASSERT(refCount.loadRelaxed() >= 0);
73 static QMutexPrivate *allocate();
76 QAtomicInt possiblyUnlocked;
77
78
79
80
81 enum { BigNumber = 0x100000 };
82 void derefWaiters(
int value)
noexcept;
85#if defined(Q_OS_DARWIN)
86 semaphore_t mach_semaphore;
87#elif defined(Q_OS_UNIX)
Combined button and popup list for selecting options.
constexpr bool futexAvailable()
void futexWakeAll(Atomic &)
bool futexWait(Atomic &, typename Atomic::Type, QDeadlineTimer={})
void futexWakeOne(Atomic &)
static QMutexPrivate * dummyFutexValue()