diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-05-05 17:03:54 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-10 12:54:56 +0200 |
commit | a6c8d0ba56d28f306a66f76c8aedd189003b1080 (patch) | |
tree | deb5ff9f7f51217b2e98885f9d6fba42f7b29ef3 /mkspecs | |
parent | 0bb70c316437c2b654ef2fd0555e04a57a6b3620 (diff) |
Do not allow multiple threads to acquire a QMutex
After the mutex optimizations on Mac, we did not handle the case where
semaphore_wait() could return KERN_ABORTED. Under heavy contention, this
happens, and when running in release mode, the assert in qmutex.cpp is not
executed. The code silently allows multiple threads to continue as if it
had acquired the mutex exclusively.
Fix this by checking for KERN_ABORTED from semaphore_wait(), and retry the
wait. We do not handle KERN_ABORTED for timed waits, simply return false and
let the code doing the tryLock() handle it how it deems best.
Reviewed-by: joao
(cherry picked from commit b54af0a9d6406356616889826e31925d2fa05718)
Diffstat (limited to 'mkspecs')
0 files changed, 0 insertions, 0 deletions