summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qwaitcondition_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QtCore: Remove std::mutex and std::condition_variable fallbacksThiago Macieira2023-06-121-100/+2
| | | | | | | | | | | | They existed because INTEGRITY hadn't yet been updated to the C++11 Standard Library, with a minor for broken MinGW cross-compilation builds that forgot to enable gthreads support in libstdc++. The former appears to have been since fixed and the latter is a massive toolchain configuration mistake. Change-Id: I63b988479db546dabffcfffd1766b55132371f9b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Q{Semaphore,ReadWriteLock}Private: reorganize the membersThiago Macieira2023-06-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | They are now ordered so that the mutex and the wait condition are in different cache lines, to avoid false sharing situations, if the types are holding the actual threading primitive structures, not mere pointers to some other structure elsewhere. For 64-bit systems: OS | mutex | cond | Remark --------------------+-------+-------+------------------ Darwin | 64 | 48 | FreeBSD | 8 | 8 | INTEGRITY | 8 | 8 | QMutex & QWaitCondition Linux | 24 | 48 | Always uses futex MinGW (Winpthreads) | 8 | 8 | Always uses futex MSVC (MS STL) | 32 | 16 | Always uses futex NetBSD | 48 | 40 | OpenBSD | 8 | 8 | QNX | ? | ? | Change-Id: I63b988479db546dabffcfffd176698e4f0097e90 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix improper ELF versions of certain symbolsThiago Macieira2022-12-291-0/+5
| | | | | | | | | | | | | | | | They got marked as Qt6_PRIVATE_API because of these private header defining classes that don't follow Qt's naming convention ("mutex", "condition_variable", "ControlElement"). We have an exclusion for classes whose name start with Q. Introduced by 5d903a64aca37ee7c2836e479e175336e9b7ca87 in the old Perl syncqt and ported over. Pick-to: 6.5 Fixes: QTBUG-109605 Fixes: QTBUG-109604 Change-Id: I69ecc04064514f939896fffd173369623c960bcc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QMutex: remove qmutex_win.cppThiago Macieira2022-11-301-4/+3
| | | | | | | | | | | It hasn't been used since 91f6460aff0a6ab5142f16d5f4fc1f559ca1c325, a commit that added support for futexes on Windows. It defines QT_ALWAYS_USE_FUTEX. Pick-to: 6.4 Change-Id: Ieba79baf5ac34264a988fffd172612892bd670d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Make sure all qtbase private headers include at least one otherThiago Macieira2022-02-241-0/+1
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtTest: fix build with MinGW/GCC 9: no std::mutex supportThiago Macieira2021-10-081-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately we can't depend on the C++11, 14 or 17 Standard Library, which is not properly and completely implemented everywhere. All Library features above C++98 must be checked with their corresponding __cpp_lib macro before use. This does not apply to the C++17 Core Language. qwaitcondition_p.h:144:20: error: 'mutex' in namespace 'std' does not name a type 144 | using mutex = std::mutex; | ^~~~~ qwaitcondition_p.h:59:1: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'? 58 | #include <condition_variable> +++ |+#include <mutex> 59 | #include <mutex> qwaitcondition_p.h:145:33: error: 'condition_variable' in namespace 'std' does not name a type 145 | using condition_variable = std::condition_variable; | ^~~~~~~~~~~~~~~~~~ qwaitcondition_p.h:59:1: note: 'std::condition_variable' is defined in header '<condition_variable>'; did you forget to '#include <condition_variable>'? 58 | #include <condition_variable> +++ |+#include <condition_variable> 59 | #include <mutex> Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16a9249e5330136a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Whitespace cleanup in corelib/ mimetypes, plugin and threadAllan Sandfeld Jensen2020-10-211-2/+2
| | | | | | | Done with selective application of clang-format Change-Id: Iee6bf2426de81356b6d480629ba972f980b6d93d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Short live QtPrivate::{condition_variable,mutex}!Marc Mutz2019-09-271-0/+153
This is a temporary measure to work around an implementation bug on Integrity: For all other platforms, QtPrivate::condition_variable is just std::condition_variable. On Integrity, it's a class that wraps QWaitCondition to provide the interface of std::condition_variable. This allows the use of std::condition_variable across Qt without running into the Integrity issue. Once we can depend on an more modern Integrity toolchain, removing QtPrivate::condition_variable is a simple mechanical change: s/QtPrivate::condition_variable/std::condition_variable/g; s/QtPrivate::mutex/std::mutex/g; Task-number: QTBUG-78450 Change-Id: I293a99d1cdc48691817b926aa51ecd84556e5e90 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>