summaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-05-26 08:30:26 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-03-12 21:39:51 +0000
commite8dc9ba49f22138228342c2c6473e7589d1dca94 (patch)
tree845f0b9e1608c4e2fac8898dbac456fae763b1c1 /dist
parent8289c86a95a32b6e746594a1e1d7d22bcac28f9e (diff)
QAtomic: pass explicit failure memory order to std::atomic::compare_exchange_strong
GCC 4.8 seems to get the failure memory order wrong when using the overload that only accepts one memory order and produces errors such as: bits/atomic_base.h:577:70: error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange' return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); ^ (as seen on Android). Fix by explicitly passing the failure orders corresponding to the success orders, as specified by the standard: relaxed → relaxed release → relaxed acquire → acquire acq_rel → acquire (cf. http://en.cppreference.com/w/cpp/atomic/atomic/compare_exchange). Task-number: QTBUG-59399 Change-Id: If046e735888cf331d2d6506d8d5ca9aa7402f9ad Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> (cherry picked from commit 5cc0de2e084cb887a75b076b82cf470ecdcd4dd3) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions