diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-04-27 21:29:07 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-11 12:31:57 -0700 |
commit | ff9da1db0b0963f967f45ab430ec40a3051b70b4 (patch) | |
tree | 382c6ded0b26412178c282b175b4949504d9c868 /src/corelib/compat/removed_api.cpp | |
parent | 63704529b75f831ffeb965765c10caf09f7883fe (diff) |
QMutex: add QDeadlineTimer-based tryLocks
This simplifies the code greatly, because we don't need to use
QtPrivate::convertToMilliseconds any more, as QDeadlineTimer has
nanosecond precision.
Internally it becomes simpler too because lockInternal was already using
QDeadlineTimer. I just had to use the parameter instead and update the
two non-futex implementations to take it again. This may even be fixing
a mistake in case sem_timedwait(2) got interrupted.
Change-Id: I6f518d59e63249ddbf43fffd1759fed9f50b3606
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/compat/removed_api.cpp')
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index d810da59e8..1212aef1cb 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -603,6 +603,7 @@ QStringView QXmlStreamAttributes::value(QLatin1StringView qualifiedName) const // inlined API #if QT_CONFIG(thread) +#include "qmutex.h" #include "qreadwritelock.h" #endif |