summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex_p.h
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2012-02-20 09:37:07 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-20 11:45:01 +0100
commit46bfd84fdc24fa3e3e721a5dda6cfbebe75be073 (patch)
tree51366da8f6f7ae38d3e24ce70c7703cb56f886e9 /src/corelib/thread/qmutex_p.h
parent4a0565b4439b9bb71d0e7a77b15b85611a697f57 (diff)
Use standard unix mutexes on LSB
LSB doesn't allow syscalls, so fall back to the normal _unix implementation Change-Id: I8aba6147da8b46e3f85b0454cf9aca219811c9fe Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/thread/qmutex_p.h')
-rw-r--r--src/corelib/thread/qmutex_p.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h
index 3cf0938e94..8a9d0bf39b 100644
--- a/src/corelib/thread/qmutex_p.h
+++ b/src/corelib/thread/qmutex_p.h
@@ -63,6 +63,11 @@
# include <mach/semaphore.h>
#endif
+#if defined(Q_OS_LINUX) && !defined(QT_LINUXBASE)
+// use Linux mutexes everywhere except for LSB builds
+# define Q_MUTEX_LINUX
+#endif
+
QT_BEGIN_NAMESPACE
class QMutexData
@@ -73,8 +78,9 @@ public:
: recursive(mode == QMutex::Recursive) {}
};
-#if !defined(Q_OS_LINUX)
-class QMutexPrivate : public QMutexData {
+#if !defined(Q_MUTEX_LINUX)
+class QMutexPrivate : public QMutexData
+{
public:
~QMutexPrivate();
QMutexPrivate();
@@ -122,7 +128,7 @@ public:
Qt::HANDLE event;
#endif
};
-#endif //Q_OS_LINUX
+#endif //Q_MUTEX_LINUX
class QRecursiveMutexPrivate : public QMutexData
{