4#include "qplatformdefs.h"
8#include "private/qcore_unix_p.h"
19 kern_return_t
r = semaphore_create(mach_task_self(), &mach_semaphore, SYNC_POLICY_FIFO, 0);
20 if (
r != KERN_SUCCESS)
21 qWarning(
"QMutex: failed to create semaphore, error %d",
r);
26 kern_return_t
r = semaphore_destroy(mach_task_self(), mach_semaphore);
27 if (
r != KERN_SUCCESS)
28 qWarning(
"QMutex: failed to destroy semaphore, error %d",
r);
36 r = semaphore_wait(mach_semaphore);
37 }
while (
r == KERN_ABORTED);
42 ts.tv_nsec = tv.tv_nsec;
43 ts.tv_sec = tv.tv_sec;
44 r = semaphore_timedwait(mach_semaphore, ts);
46 return (
r == KERN_SUCCESS);
51 semaphore_signal(mach_semaphore);
bool wait(QDeadlineTimer timeout=QDeadlineTimer::Forever)
Combined button and popup list for selecting options.
timespec durationToTimespec(std::chrono::nanoseconds timeout) noexcept
GLbitfield GLuint64 timeout
[4]