summaryrefslogtreecommitdiffstats
path: root/sync.profile
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-04 22:33:07 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-08 10:13:47 +0200
commitf14db5dd3ab914db1d2e404520c97b0900b582b3 (patch)
treed7145d40f3079411694745e1421fcb7904852967 /sync.profile
parentc39910993eaf6a7d68fbbe366d990f3f972533ca (diff)
qsslsocket_openssl_symbols.cpp: replace mutex pool use with QBasicMutex
The use of QMutexPool caused an #ifdef, because, lacking an object, some OpenSSL function pointer was used as the address required as input for the mutex pool. Sadly, the names of the functions differ between OpenSSL versions, thus the need for an #ifdef. By simply using a QBasicMutex (defined at namespace scope to evade https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561), the #ifdef can go away. Another level of #ifdefs goes away because, even for non-QT_CONFIG(thread) builds, Q*Mutex etc are defined, just as no-ops. So we can freely use them without QT_CONFIG(thread) guard, unlike QMutexPool. Finally, optimize for the (common?) case of already-loaded libraries by making symbolsResolved an atomic variable, and checking that before taking the mutex (double-checked locking, done right). For reasons of said GCC bug, again, the QBasicAtomic is defined at namespace scope. And then move the other boolean there for symmetry. Change-Id: Ic5f44871fb200e5368b9af327e4d1e852fbc586c Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'sync.profile')
0 files changed, 0 insertions, 0 deletions