summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-12-31 17:12:46 -0300
committerThiago Macieira <thiago.macieira@intel.com>2025-01-18 11:05:34 -0800
commitcc4abefb1db3bdfee0d57ea528d55073a4498b4d (patch)
tree2a640e0ac57fea1730392d41b5d41d56a2ca5551 /src/corelib/thread/qmutex.cpp
parent7ad2083ec3cbc9dce949e83465973435d0aa992a (diff)
QMutex: mark the out-of-line, *Internal() methods Q_NEVER_INLINE
With LTO, I'm seeing GCC conclude that it's best to inline the lockInternal() and unlockInternal() methods into the public ones and then emit out-of-line copies for those. That's actually sub-optimal, so force GCC not to do it. Pick-to: 6.9 6.8 Change-Id: I88c29098757ea6e70c00fffde56989ec05b136bd Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/thread/qmutex.cpp')
-rw-r--r--src/corelib/thread/qmutex.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp
index 25cd9bcd9ec..77ec83b6120 100644
--- a/src/corelib/thread/qmutex.cpp
+++ b/src/corelib/thread/qmutex.cpp
@@ -638,6 +638,7 @@ void QRecursiveMutex::unlock() noexcept
/*!
\internal helper for lock()
*/
+Q_NEVER_INLINE
void QBasicMutex::lockInternal() QT_MUTEX_LOCK_NOEXCEPT
{
if (futexAvailable()) {
@@ -671,6 +672,7 @@ bool QBasicMutex::lockInternal(int timeout) QT_MUTEX_LOCK_NOEXCEPT
/*!
\internal helper for tryLock(QDeadlineTimer)
*/
+Q_NEVER_INLINE
bool QBasicMutex::lockInternal(QDeadlineTimer deadlineTimer) QT_MUTEX_LOCK_NOEXCEPT
{
if (deadlineTimer.hasExpired())
@@ -810,6 +812,7 @@ bool QBasicMutex::lockInternal(QDeadlineTimer deadlineTimer) QT_MUTEX_LOCK_NOEXC
/*!
\internal
*/
+Q_NEVER_INLINE
void QBasicMutex::unlockInternal() noexcept
{
QMutexPrivate *copy = d_ptr.loadAcquire();