summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutex_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-06-10 09:47:25 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-06-15 04:04:56 -0700
commit96c76839f9870f44790bbd1936a96c0d5200b6ad (patch)
treea1230d73a78fa4da13ed193cfdc00d2ead173fd4 /src/corelib/thread/qfutex_p.h
parent585db639a407069c241e11351df1ed3d1e7b869e (diff)
Switch futex support to QDeadlineTimer
This allows us to use absolute times on Linux (today) and FreeBSD (soon), plus simplifies both QMutex and QSemaphore. Change-Id: I63b988479db546dabffcfffd17675a182aa528fa Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/thread/qfutex_p.h')
-rw-r--r--src/corelib/thread/qfutex_p.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
index 05ddede641..f7130ebad2 100644
--- a/src/corelib/thread/qfutex_p.h
+++ b/src/corelib/thread/qfutex_p.h
@@ -15,16 +15,15 @@
// We mean it.
//
+#include <qdeadlinetimer.h>
#include <private/qglobal_p.h>
-#include <chrono>
-
QT_BEGIN_NAMESPACE
namespace QtDummyFutex {
constexpr inline bool futexAvailable() { return false; }
template <typename Atomic>
- inline bool futexWait(Atomic &, typename Atomic::Type, std::chrono::nanoseconds = {})
+ inline bool futexWait(Atomic &, typename Atomic::Type, QDeadlineTimer = {})
{ Q_UNREACHABLE_RETURN(false); }
template <typename Atomic> inline void futexWakeOne(Atomic &)
{ Q_UNREACHABLE(); }