QMutex: improve codegen for non-futex lockInternal()

Amends commit ff9da1db0b0963f967f45ab430ec40a3051b70b4.

QDeadlineTimer's Forever constructor is constexpr inline, while the one
taking an integer is neither. In an LTO build, the compiler might have
realized that it's constant, but let's be sure.

Pick-to: 6.8
Change-Id: I2c07caec660e05efe695fffd6ac8ec3120258a96
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit ef73a5f175f8d51a0bacbdd30cacbd3b6d151d36)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2025-01-16 11:07:34 -08:00 committed by Qt Cherry-pick Bot
parent 1290935fab
commit 5dbe3ecde8

View File

@ -652,7 +652,7 @@ void QBasicMutex::lockInternal() noexcept(FutexAlwaysAvailable)
}
Q_ASSERT(d_ptr.loadRelaxed());
} else {
lockInternal(-1);
lockInternal(QDeadlineTimer::Forever);
}
}