summaryrefslogtreecommitdiff
path: root/sal/inc/osl/thread.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-03-05 14:27:39 +0000
committerOliver Bolte <obo@openoffice.org>2007-03-05 14:27:39 +0000
commitc627c8f188635aa08f21b1a648dfdef9f79a8172 (patch)
tree0bfbe0bd1cbb4a0ddb95a7d3712b44c7b911dbe2 /sal/inc/osl/thread.hxx
parent06f1e94cef0d3c51a91cab5ca8a658d4a01d0771 (diff)
INTEGRATION: CWS vcl74 (1.8.212); FILE MERGED
2007/02/12 12:30:38 pl 1.8.212.1: #i67603# avoid unnecessary assertions
Diffstat (limited to 'sal/inc/osl/thread.hxx')
-rw-r--r--sal/inc/osl/thread.hxx26
1 files changed, 16 insertions, 10 deletions
diff --git a/sal/inc/osl/thread.hxx b/sal/inc/osl/thread.hxx
index 3fc89ec7b817..066959663046 100644
--- a/sal/inc/osl/thread.hxx
+++ b/sal/inc/osl/thread.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: thread.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 14:34:15 $
+ * last change: $Author: obo $ $Date: 2007-03-05 15:27:39 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -81,7 +81,8 @@ public:
virtual ~Thread()
{
- osl_destroyThread( m_hThread);
+ if( m_hThread )
+ osl_destroyThread( m_hThread);
}
sal_Bool SAL_CALL create()
@@ -109,22 +110,26 @@ public:
virtual void SAL_CALL suspend()
{
- osl_suspendThread(m_hThread);
+ if( m_hThread )
+ osl_suspendThread(m_hThread);
}
virtual void SAL_CALL resume()
{
- osl_resumeThread(m_hThread);
+ if( m_hThread )
+ osl_resumeThread(m_hThread);
}
virtual void SAL_CALL terminate()
{
- osl_terminateThread(m_hThread);
+ if( m_hThread )
+ osl_terminateThread(m_hThread);
}
virtual void SAL_CALL join()
{
- osl_joinWithThread(m_hThread);
+ if( m_hThread )
+ osl_joinWithThread(m_hThread);
}
sal_Bool SAL_CALL isRunning()
@@ -134,12 +139,13 @@ public:
void SAL_CALL setPriority( oslThreadPriority Priority)
{
- osl_setThreadPriority(m_hThread, Priority);
+ if( m_hThread )
+ osl_setThreadPriority(m_hThread, Priority);
}
oslThreadPriority SAL_CALL getPriority()
{
- return osl_getThreadPriority(m_hThread);
+ return m_hThread ? osl_getThreadPriority(m_hThread) : osl_Thread_PriorityUnknown;
}
oslThreadIdentifier SAL_CALL getIdentifier() const
@@ -165,7 +171,7 @@ public:
virtual sal_Bool SAL_CALL schedule()
{
- return osl_scheduleThread(m_hThread);
+ return m_hThread ? osl_scheduleThread(m_hThread) : sal_False;
}
SAL_CALL operator oslThread() const