diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-05-05 15:03:54 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-05-05 15:03:54 (GMT) |
commit | b54af0a9d6406356616889826e31925d2fa05718 (patch) | |
tree | 9027a4d6f082c8b9c0a2cd7a8922d6de8258d3a8 /src/network/access | |
parent | d1ac6af4f30e822e161fd8772104aa2e30e55a2f (diff) | |
download | Qt-b54af0a9d6406356616889826e31925d2fa05718.zip Qt-b54af0a9d6406356616889826e31925d2fa05718.tar.gz Qt-b54af0a9d6406356616889826e31925d2fa05718.tar.bz2 |
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
Diffstat (limited to 'src/network/access')
0 files changed, 0 insertions, 0 deletions