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>
47 bool wait(QDeadlineTimer timeout = QDeadlineTimer::Forever);
48 void wakeUp()
noexcept;
56 Q_ASSERT(refCount.loadRelaxed() >= 0);
59 c = refCount.loadRelaxed();
62 }
while (!refCount.testAndSetRelaxed(c, c + 1));
63 Q_ASSERT(refCount.loadRelaxed() >= 0);
68 Q_ASSERT(refCount.loadRelaxed() >= 0);
69 if (!refCount.deref())
71 Q_ASSERT(refCount.loadRelaxed() >= 0);
74 static QMutexPrivate *allocate();
77 QAtomicInt possiblyUnlocked;
78
79
80
81
82 enum { BigNumber = 0x100000 };
83 void derefWaiters(
int value)
noexcept;
86#if defined(Q_OS_DARWIN)
87 semaphore_t mach_semaphore;
88#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()