diff options
Diffstat (limited to 'sal/qa/osl/process/osl_Thread.cxx')
-rw-r--r-- | sal/qa/osl/process/osl_Thread.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 0b97d0b95d8c..3c9891b76e54 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -48,6 +48,8 @@ using namespace osl; +namespace { + // Small stopwatch class StopWatch { TimeValue t1,t2; // Start and stoptime @@ -69,6 +71,8 @@ public: double getTenthSec() const; }; +} + // ================================= Stop Watch ================================= // A small stopwatch for internal use @@ -145,6 +149,8 @@ double StopWatch::getTenthSec() const return nValue ; } +namespace { + template <class T> class ThreadSafeValue { @@ -168,6 +174,8 @@ public: void release() {m_aMutex.release();} }; +} + namespace ThreadHelper { static void thread_sleep_tenth_sec(sal_Int32 _nTenthSec) @@ -205,6 +213,8 @@ namespace ThreadHelper } } +namespace { + /** Simple thread for testing Thread-create. Just add 1 of value 0, and after running, result is 1. @@ -393,6 +403,8 @@ public: }; +} + namespace osl_Thread { @@ -1671,6 +1683,8 @@ static void destroyCallback(void * data) static ThreadData myThreadData(destroyCallback); +namespace { + class myKeyThread : public Thread { public: @@ -1708,8 +1722,12 @@ public: } }; +} + static ThreadData idData; +namespace { + class idThread: public Thread { public: @@ -1735,6 +1753,8 @@ public: } }; +} + namespace osl_ThreadData { |