diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-03-25 17:26:37 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-04-07 13:35:10 +0200 |
commit | 587e3bb0ba6def90906f1f6b8c60c8f33ec88571 (patch) | |
tree | b8d6606416eb8dffaff4688218fa3030e8ab4ba8 /src/gui/platform | |
parent | b8802071ed00689373da5817fc4824a30b5fcf86 (diff) |
QSemaphore: fix missed wakes with futex on Windows
We do this by making the 'futexNeedsWakeAllBit' to be part of both the
expectedValue and the pointer we're waiting on.
This makes sense since having the 'futexNeedsWakeAllBit' set is a
requirement for starting a sleep. Thus we should condition
sleeping on whether or not another thread unset it.
Since the futexNeedsWakeAllBit is in the "topmost" bit of the pointer we
wait on we'll need to use the full 64-bits on 64-bit platforms.
This isn't enabled (nor was it an issue) for configurations with
'futexHasWaiterCount' since that works differently, and waits for the
high 32 bits.
Fixes: QTBUG-92148
Change-Id: I424c605f0120ea5e647c5bb19b00ff35eaf1608a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/platform')
0 files changed, 0 insertions, 0 deletions