summaryrefslogtreecommitdiff
path: root/qmake/tools/qmutex_unix.cpp
Side-by-side diff
Diffstat (limited to 'qmake/tools/qmutex_unix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/tools/qmutex_unix.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qmake/tools/qmutex_unix.cpp b/qmake/tools/qmutex_unix.cpp
index c861b2d..3eb59cf 100644
--- a/qmake/tools/qmutex_unix.cpp
+++ b/qmake/tools/qmutex_unix.cpp
@@ -34,26 +34,27 @@
** not clear to you.
**
**********************************************************************/
#if defined(QT_THREAD_SUPPORT)
#include "qplatformdefs.h"
typedef pthread_mutex_t Q_MUTEX_T;
// POSIX threads mutex types
#if ((defined(PTHREAD_MUTEX_RECURSIVE) && defined(PTHREAD_MUTEX_DEFAULT)) || \
- defined(Q_OS_FREEBSD)) && !defined(Q_OS_UNIXWARE) && !defined(Q_OS_SOLARIS)
- // POSIX 1003.1c-1995 - We love this OS
+ defined(Q_OS_FREEBSD)) && !defined(Q_OS_UNIXWARE) && !defined(Q_OS_SOLARIS) && \
+ !defined(Q_OS_MAC)
+// POSIX 1003.1c-1995 - We love this OS
# define Q_MUTEX_SET_TYPE(a, b) pthread_mutexattr_settype((a), (b))
# if defined(QT_CHECK_RANGE)
# define Q_NORMAL_MUTEX_TYPE PTHREAD_MUTEX_ERRORCHECK
# else
# define Q_NORMAL_MUTEX_TYPE PTHREAD_MUTEX_DEFAULT
# endif
# define Q_RECURSIVE_MUTEX_TYPE PTHREAD_MUTEX_RECURSIVE
#elif defined(MUTEX_NONRECURSIVE_NP) && defined(MUTEX_RECURSIVE_NP)
// POSIX 1003.4a pthreads draft extensions
# define Q_MUTEX_SET_TYPE(a, b) pthread_mutexattr_setkind_np((a), (b));
# define Q_NORMAL_MUTEX_TYPE MUTEX_NONRECURSIVE_NP
# define Q_RECURSIVE_MUTEX_TYPE MUTEX_RECURSIVE_NP
@@ -652,25 +653,26 @@ bool QMutex::tryLock()
...
}
};
\endcode
\sa QMutex, QWaitCondition
*/
/*!
\fn QMutexLocker::QMutexLocker( QMutex *mutex )
Constructs a QMutexLocker and locks \a mutex. The mutex will be
- unlocked when the QMutexLocker is destroyed.
+ unlocked when the QMutexLocker is destroyed. If \a mutex is zero,
+ QMutexLocker does nothing.
\sa QMutex::lock()
*/
/*!
\fn QMutexLocker::~QMutexLocker()
Destroys the QMutexLocker and unlocks the mutex which was locked
in the constructor.
\sa QMutexLocker::QMutexLocker(), QMutex::unlock()
*/