diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2012-12-21 15:51:50 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-21 19:05:02 +0100 |
commit | 7706c31eaa686299d7e22da809fec00c0db47c86 (patch) | |
tree | 287228dce1f3b47eff51b44caec6977e89e5353d /src/corelib/thread | |
parent | 21e809a486874b96b15735c94df6f6576ccd5368 (diff) |
Fix some typos
Change-Id: I4e8d9bd8ea66ec810e4f1fbfd8ddbf25c4b3d980
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qmutex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 3815ce16a7..97a5e5738c 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -394,7 +394,7 @@ bool QBasicMutex::isRecursive() to wait on the mutex. There are two tricks to keep in mind: We don't want to increment waiters after we checked no threads are waiting (waiters == 0). That's why we atomically set the BigNumber flag on waiters when - we check waiters. Similarily, if waiters is decremented right after we checked, + we check waiters. Similarly, if waiters is decremented right after we checked, the mutex would be unlocked (d->wakeUp() has (or will) be called), but there is no thread waiting. This is only happening if there was a timeout in tryLock at the same time as the mutex is unlocked. So when there was a timeout, we set the @@ -531,7 +531,7 @@ void QBasicMutex::unlockInternal() Q_DECL_NOTHROW QMutexPrivate *d = reinterpret_cast<QMutexPrivate *>(copy); - // If no one is waiting for the lock anymore, we shoud reset d to 0x0. + // If no one is waiting for the lock anymore, we should reset d to 0x0. // Using fetchAndAdd, we atomically check that waiters was equal to 0, and add a flag // to the waiters variable (BigNumber). That way, we avoid the race in which waiters is // incremented right after we checked, because we won't increment waiters if is |