summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qwaitcondition_win.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-04-27 20:47:53 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-05-11 12:31:55 -0700
commit0c0778fb36641efe73caa8776ee0a2ffdc98f4ea (patch)
tree6a615456fb854b86dee9bc3c2085e3bac3d17797 /src/corelib/thread/qwaitcondition_win.cpp
parent859ef056331a94fb0b1e4b41f596ff78539dfd8b (diff)
QReadWriteLock: remove the private function from the symbol table
Just move it to the private class. This also allows this function to get inlined in QWaitCondition::wait(). Pick-to: 6.5 Change-Id: I6f518d59e63249ddbf43fffd1759fc99c28c7ca8 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/thread/qwaitcondition_win.cpp')
-rw-r--r--src/corelib/thread/qwaitcondition_win.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/thread/qwaitcondition_win.cpp b/src/corelib/thread/qwaitcondition_win.cpp
index 2152ae551f..c176241f47 100644
--- a/src/corelib/thread/qwaitcondition_win.cpp
+++ b/src/corelib/thread/qwaitcondition_win.cpp
@@ -145,12 +145,14 @@ bool QWaitCondition::wait(QMutex *mutex, QDeadlineTimer deadline)
bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
{
+ using namespace QReadWriteLockStates;
+
if (!readWriteLock)
return false;
- auto previousState = readWriteLock->stateForWaitCondition();
- if (previousState == QReadWriteLock::Unlocked)
+ auto previousState = QReadWriteLockPrivate::stateForWaitCondition(readWriteLock);
+ if (previousState == Unlocked)
return false;
- if (previousState == QReadWriteLock::RecursivelyLocked) {
+ if (previousState == RecursivelyLocked) {
qWarning("QWaitCondition: cannot wait on QReadWriteLocks with recursive lockForWrite()");
return false;
}
@@ -160,7 +162,7 @@ bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
bool returnValue = d->wait(wce, time);
- if (previousState == QReadWriteLock::LockedForWrite)
+ if (previousState == LockedForWrite)
readWriteLock->lockForWrite();
else
readWriteLock->lockForRead();