diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-11 14:08:39 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 03:45:50 +0200 |
commit | 870bd84a4ee53ea98fd232da18771b1525dac1a1 (patch) | |
tree | b4f473f26f944352aeb2874ae61371183b5332d7 /src/corelib/thread/qmutex.cpp | |
parent | 3acaa648f0ffd03c4695d0be7ed25e73724e4417 (diff) |
Don't recheck about timeout == 0 during mutex locking
If the timeout wasn't zero, it can only become zero if we return from
futex() with a non-timeout reason but subsequently expires while we're
recalculating something.
A side effect is that we try-lock a non-recursive mutex exactly
once. Before this change, we'd fastTryLock() twice even with
timeout == 0.
Change-Id: I0af09fc2a84669a683a843fcf1513203b075dfb7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/corelib/thread/qmutex.cpp')
0 files changed, 0 insertions, 0 deletions