From ba5f15e44a74139a8ac3630e7c7e71444cb0afac Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Tue, 20 Jun 2006 10:23:08 +0000
Subject: [PATCH] INTEGRATION: CWS warnings01 (1.5.134); FILE MERGED 2005/11/21
15:07:04 sb 1.5.134.5: #i53898# Made code warning-free. 2005/09/23 00:19:34
sb 1.5.134.4: RESYNC: (1.5-1.6); FILE MERGED 2005/09/09 07:56:49 sb
1.5.134.3: #i53898# Improved previous change. 2005/09/08 14:08:42 sb
1.5.134.2: #i53898# Simplified previous change. 2005/09/07 16:34:16 sb
1.5.134.1: #i53898# Made code warning-free.
---
vos/source/thread.cxx | 34 ++++++++++------------------------
1 file changed, 10 insertions(+), 24 deletions(-)
diff --git a/vos/source/thread.cxx b/vos/source/thread.cxx
index c4cc8e4f65fd..c51a969a5a6e 100644
--- a/vos/source/thread.cxx
+++ b/vos/source/thread.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: thread.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: vg $ $Date: 2006-06-02 12:45:11 $
+ * last change: $Author: hr $ $Date: 2006-06-20 11:23:08 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -40,22 +40,9 @@
#include
#include
+using namespace vos;
-
-#if !defined ( WNT )
-
-void _OThread_WorkerFunction(void* pthis)
-{
- NAMESPACE_VOS(_cpp_OThread_WorkerFunction)(pthis);
-}
-
-void NAMESPACE_VOS(_cpp_OThread_WorkerFunction)(void* pthis)
-
-#else
-
-void SAL_CALL _OThread_WorkerFunction(void* pthis)
-
-#endif
+void vos::threadWorkerFunction_impl(void * pthis)
{
NAMESPACE_VOS(OThread)* pThis= (NAMESPACE_VOS(OThread)*)pthis;
@@ -71,8 +58,6 @@ void SAL_CALL _OThread_WorkerFunction(void* pthis)
}
}
-using namespace vos;
-
/////////////////////////////////////////////////////////////////////////////
//
// Thread class
@@ -103,8 +88,9 @@ sal_Bool OThread::create()
{
VOS_ASSERT(m_hThread == 0); // only one running thread per instance
- if (m_hThread= osl_createSuspendedThread(_OThread_WorkerFunction,
- (void*)this))
+ m_hThread = osl_createSuspendedThread(
+ threadWorkerFunction_impl, (void*)this);
+ if (m_hThread)
osl_resumeThread(m_hThread);
return m_hThread != 0;
@@ -114,8 +100,7 @@ sal_Bool OThread::createSuspended()
{
VOS_ASSERT(m_hThread == 0); // only one running thread per instance
- m_hThread= osl_createSuspendedThread(_OThread_WorkerFunction,
- (void*)this);
+ m_hThread= osl_createSuspendedThread(threadWorkerFunction_impl, (void*)this);
return m_hThread != 0;
}
@@ -240,7 +225,8 @@ VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OThreadData, vos),
OThreadData::OThreadData( oslThreadKeyCallbackFunction pCallback )
{
- VOS_VERIFY(m_hKey = osl_createThreadKey( pCallback ));
+ m_hKey = osl_createThreadKey( pCallback );
+ VOS_VERIFY(m_hKey);
}
OThreadData::~OThreadData()