summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-22 11:04:19 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-22 11:04:19 (GMT)
commit5e72b9fb3aae520a690c73bba2eb61d6614a1510 (patch)
treee1421a2d73988cce6d258a879e5fc537da8c44ad /src/corelib/kernel
parenta351dc70bcd6e78dad2bf0cada0c9e431f3bdd7d (diff)
parent87911c6c97b11bd7d10a38698460174b6cadfbe8 (diff)
downloadQt-5e72b9fb3aae520a690c73bba2eb61d6614a1510.zip
Qt-5e72b9fb3aae520a690c73bba2eb61d6614a1510.tar.gz
Qt-5e72b9fb3aae520a690c73bba2eb61d6614a1510.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-animations
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qobject.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index cfd8493..1e9e284 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -92,8 +92,8 @@ static int *queuedConnectionTypes(const QList<QByteArray> &typeNames)
return types;
}
-QBasicAtomicPointer<QMutexPool> signalSlotMutexes = Q_BASIC_ATOMIC_INITIALIZER(0);
-QBasicAtomicInt objectCount = Q_BASIC_ATOMIC_INITIALIZER(0);
+static QBasicAtomicPointer<QMutexPool> signalSlotMutexes = Q_BASIC_ATOMIC_INITIALIZER(0);
+static QBasicAtomicInt objectCount = Q_BASIC_ATOMIC_INITIALIZER(0);
/** \internal
* mutex to be locked when accessing the connectionlists or the senders list
@@ -117,8 +117,7 @@ extern "C" Q_CORE_EXPORT void qt_addObject(QObject *)
extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
{
if(!objectCount.deref()) {
- QMutexPool *old = signalSlotMutexes;
- signalSlotMutexes.testAndSetAcquire(old, 0);
+ QMutexPool *old = signalSlotMutexes.fetchAndStoreAcquire(0);
delete old;
}
}