diff options
Diffstat (limited to 'tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp')
-rw-r--r-- | tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 76e50eee1b..12bc4ba6af 100644 --- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -184,10 +184,10 @@ void tst_QReadWriteLock::readWriteLockUnlockLoop() } -QAtomicInt lockCount(0); -QReadWriteLock readWriteLock; -QSemaphore testsTurn; -QSemaphore threadsTurn; +static QAtomicInt lockCount(0); +static QReadWriteLock readWriteLock; +static QSemaphore testsTurn; +static QSemaphore threadsTurn; void tst_QReadWriteLock::tryReadLock() @@ -403,8 +403,8 @@ void tst_QReadWriteLock::tryWriteLock() } } -bool threadDone; -QAtomicInt release; +static bool threadDone; +static QAtomicInt release; /* write-lock @@ -511,9 +511,9 @@ public: while (t.elapsed()<runTime) { testRwlock.lockForRead(); if(print) printf("reading\n"); - if (holdTime) msleep(holdTime); + if (holdTime) msleep(ulong(holdTime)); testRwlock.unlock(); - if (waitTime) msleep(waitTime); + if (waitTime) msleep(ulong(waitTime)); } } }; @@ -547,14 +547,14 @@ public: while (t.elapsed() < runTime) { testRwlock.lockForWrite(); if (print) printf("."); - if (holdTime) msleep(holdTime); + if (holdTime) msleep(ulong(holdTime)); testRwlock.unlock(); - if (waitTime) msleep(waitTime); + if (waitTime) msleep(ulong(waitTime)); } } }; -volatile int count=0; +static volatile int count = 0; /* for(runTime msecs) @@ -594,7 +594,7 @@ public: } count=0; testRwlock.unlock(); - msleep(waitTime); + msleep(ulong(waitTime)); } } }; @@ -626,7 +626,7 @@ public: if(count) qFatal("Non-zero count at Read! (%d)",count ); testRwlock.unlock(); - msleep(waitTime); + msleep(ulong(waitTime)); } } }; |