diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-03-22 23:06:56 +0800 |
---|---|---|
committer | Aapo Keskimolo <aapo.keskimolo@qt.io> | 2018-03-29 15:15:03 +0000 |
commit | 72f8f994b26fe51bf4828e17096b7ec0abe1f0d3 (patch) | |
tree | 483df64747cd780c2ad9242457b3e61712ba8182 /qmake/library | |
parent | 2e496e93225503c8af068e53294c5eb13aa3bfd7 (diff) |
QSemaphore: attempt to fix again the 64-bit Linux semaphore
This time, the issue was that we could race a wait and a wake. A multi-
token waiter would not notice that the number of tokens changed because
it only performed a fetch-and-OR, then waited on the high part which did
not change. That means the futex_wait() would succeed, when we wanted it
to have failed.
So we have to bring back a portion of what commit
081c001deb75fa38385d3ff8cbbdb4f788529133 removed: we need to keep both
the token count and the waiter count in the high word.
Task-number: QTBUG-67214
Change-Id: I04a43ee94975482f9e32fffd151e467a9e0030b3
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'qmake/library')
0 files changed, 0 insertions, 0 deletions