Diffstat (limited to 'qmake/include/private/qmutexpool_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qmutexpool_p.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/qmake/include/private/qmutexpool_p.h b/qmake/include/private/qmutexpool_p.h new file mode 100644 index 0000000..3d9fef7 --- a/dev/null +++ b/qmake/include/private/qmutexpool_p.h @@ -0,0 +1,39 @@ +#ifndef QMUTEXPOOL_H +#define QMUTEXPOOL_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of QSettings. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +// + +#ifdef QT_THREAD_SUPPORT + +#include "qmutex.h" +#include "qmemarray.h" + +class QMutexPool +{ +public: + QMutexPool( bool recursive = FALSE, int size = 17 ); + ~QMutexPool(); + + QMutex *get( void *address ); + +private: + QMutex mutex; + QMemArray<QMutex*> mutexes; + bool recurs; +}; + +extern QMutexPool *qt_global_mutexpool; + +#endif // QT_THREAD_SUPPORT + +#endif // QMUTEXPOOL_H |