summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qmutex.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@kde.org>2011-10-28 11:51:06 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-31 12:14:04 +0100
commit72257f642944a347b806ac34934d0fb8bc472b1c (patch)
treecf7dcd30be1b442e8d8dcc1afc5a0befbfc0d09f /src/corelib/thread/qmutex.h
parent3c0a26b79f4ab8a20ac385c1f885ee18156a6555 (diff)
Rename QBasicMutex::d to QBasicMutex::d_ptr
Because we use d as a local variable. We used this->d to refer it, but this can be confusing to have twice the same name Change-Id: I570aa5f444ada358eb456d6b3d9b8bfa60b10bbf Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/corelib/thread/qmutex.h')
-rw-r--r--src/corelib/thread/qmutex.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qmutex.h b/src/corelib/thread/qmutex.h
index 4bc2c87cda..2342892a94 100644
--- a/src/corelib/thread/qmutex.h
+++ b/src/corelib/thread/qmutex.h
@@ -65,8 +65,8 @@ public:
}
inline void unlock() {
- Q_ASSERT(d.load()); //mutex must be locked
- if (!d.testAndSetRelease(dummyLocked(), 0))
+ Q_ASSERT(d_ptr.load()); //mutex must be locked
+ if (!d_ptr.testAndSetRelease(dummyLocked(), 0))
unlockInternal();
}
@@ -78,12 +78,12 @@ public:
private:
inline bool fastTryLock() {
- return d.testAndSetAcquire(0, dummyLocked());
+ return d_ptr.testAndSetAcquire(0, dummyLocked());
}
bool lockInternal(int timeout = -1);
void unlockInternal();
- QBasicAtomicPointer<QMutexPrivate> d;
+ QBasicAtomicPointer<QMutexPrivate> d_ptr;
static inline QMutexPrivate *dummyLocked() {
return reinterpret_cast<QMutexPrivate *>(quintptr(1));
}