diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-16 07:30:02 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-16 07:30:02 +0200 |
commit | c4e472ea1037afde7b99d9132a49eb616cad240e (patch) | |
tree | c9e66fdda63a2e5c3f5a944d711e5c9845de33ac /src/corelib/thread/qmutexpool_p.h | |
parent | 7b23ebefb2360feb139ff6e10d2253396e58721e (diff) | |
parent | 6c1e352803a6efbd8b14e5296434e22165b65084 (diff) |
Merge remote-tracking branch 'origin/5.7.0' into 5.7
Conflicts:
src/corelib/tools/qsimd_p.h
Change-Id: I7c6bfc5873d97ad7f51a540dd9c18b9359dde59f
Diffstat (limited to 'src/corelib/thread/qmutexpool_p.h')
-rw-r--r-- | src/corelib/thread/qmutexpool_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/thread/qmutexpool_p.h b/src/corelib/thread/qmutexpool_p.h index 33e9a52cb7..796e65d960 100644 --- a/src/corelib/thread/qmutexpool_p.h +++ b/src/corelib/thread/qmutexpool_p.h @@ -66,7 +66,7 @@ public: ~QMutexPool(); inline QMutex *get(const void *address) { - int index = uint(quintptr(address)) % count; + int index = uint(quintptr(address)) % mutexes.count(); QMutex *m = mutexes[index].load(); if (m) return m; @@ -78,8 +78,7 @@ public: private: QMutex *createMutex(int index); - int count; - QAtomicPointer<QMutex> *mutexes; + QVarLengthArray<QAtomicPointer<QMutex>, 131> mutexes; QMutex::RecursionMode recursionMode; }; |