Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qfutex_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 Intel Corporation.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QFUTEX_P_H
5#define QFUTEX_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qdeadlinetimer.h>
19#include <private/qglobal_p.h>
20
22
23namespace QtDummyFutex {
24 constexpr inline bool futexAvailable() { return false; }
25 template <typename Atomic>
26 inline bool futexWait(Atomic &, typename Atomic::Type, QDeadlineTimer = {})
27 { Q_UNREACHABLE_RETURN(false); }
28 template <typename Atomic> inline void futexWakeOne(Atomic &)
29 { Q_UNREACHABLE(); }
30 template <typename Atomic> inline void futexWakeAll(Atomic &)
31 { Q_UNREACHABLE(); }
32}
33
35
36#if defined(Q_OS_DARWIN)
37# include "qfutex_mac_p.h"
38#elif defined(Q_OS_FREEBSD)
39# include "qfutex_freebsd_p.h"
40#elif defined(Q_OS_LINUX) && !defined(QT_LINUXBASE)
41// use Linux mutexes everywhere except for LSB builds
42# include "qfutex_linux_p.h"
43#elif defined(Q_OS_WIN)
44# include "qfutex_win_p.h"
45#else
47namespace QtFutex = QtDummyFutex;
49#endif
50
51#endif // QFUTEX_P_H
\inmodule QtCore
Combined button and popup list for selecting options.
constexpr bool futexAvailable()
Definition qfutex_p.h:24
void futexWakeAll(Atomic &)
Definition qfutex_p.h:30
bool futexWait(Atomic &, typename Atomic::Type, QDeadlineTimer={})
Definition qfutex_p.h:26
void futexWakeOne(Atomic &)
Definition qfutex_p.h:28