summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-05-22 20:06:57 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-03-03 20:53:26 +0000
commitfd207c06b81b12086bdf80e4fa7b393bf1f424d6 (patch)
tree1ef07d6c699ed66647207c9b42edbec2f11743d7 /src/corelib/thread/qmutex_p.h
parent8c04a5e9640df0f1b2f533ee5fa698e2f466ad1f (diff)
Port QWaitCondition to QDeadlineTimer
Since pthread_cond_timedwait takes absolute time instead of relative time like most POSIX API, there's a small gain in performance here: we avoid an extra system call to get the current time. Task-number: QTBUG-64266 Change-Id: I25d85d86649448d5b2b3fffd1451138568091f50 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/thread/qmutex_p.h')
-rw-r--r--src/corelib/thread/qmutex_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h
index 4e6f522a37..ec9bfc1152 100644
--- a/src/corelib/thread/qmutex_p.h
+++ b/src/corelib/thread/qmutex_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qnamespace.h>
#include <QtCore/qmutex.h>
#include <QtCore/qatomic.h>
+#include <QtCore/qdeadlinetimer.h>
#if defined(Q_OS_MAC)
# include <mach/semaphore.h>
@@ -146,7 +147,7 @@ public:
// helper functions for qmutex_unix.cpp and qwaitcondition_unix.cpp
// they are in qwaitcondition_unix.cpp actually
void qt_initialize_pthread_cond(pthread_cond_t *cond, const char *where);
-void qt_abstime_for_timeout(struct timespec *ts, int timeout);
+void qt_abstime_for_timeout(struct timespec *ts, QDeadlineTimer deadline);
#endif
QT_END_NAMESPACE