diff --git a/automation/inc/automation/communi.hxx b/automation/inc/automation/communi.hxx
index 82aa208..35c1729 100644
--- automation/inc/automation/communi.hxx
+++ automation/inc/automation/communi.hxx
@@ -39,8 +39,8 @@
 #ifndef _SVARRAY_HXX //autogen
 #include <svtools/svarray.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_ //autogen
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_MUTEX_HXX_ //autogen
 #include <vos/mutex.hxx>
@@ -95,7 +95,7 @@ public:
 	CommunicationManagerClient( BOOL bUseMultiChannel = FALSE );
 };
 
-class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public NAMESPACE_VOS(OThread)
+class CommunicationLinkViaSocket : public SimpleCommunicationLinkViaSocket, public osl::Thread
 {
 public:
 	CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket );
@@ -152,7 +152,7 @@ private:
 	void AddConnection( CommunicationLink *pNewConnection );
 };
 
-class CommunicationManagerServerAcceptThread: public NAMESPACE_VOS(OThread)
+class CommunicationManagerServerAcceptThread: public osl::Thread
 {
 public:
 	CommunicationManagerServerAcceptThread( CommunicationManagerServerViaSocket* pServer, ULONG nPort, USHORT nMaxCon = CM_UNLIMITED_CONNECTIONS );
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx
index 9f844b5..498ea8c 100644
--- automation/source/communi/communi.cxx
+++ automation/source/communi/communi.cxx
@@ -226,7 +226,7 @@ void CommunicationLinkViaSocket::run()
 
 		TimeValue sNochEins = {0, 1000000};
 		while ( schedule() && bIsInsideCallback )	// solange der letzte Callback nicht beendet ist
-			sleep( sNochEins );
+			wait( sNochEins );
 		SetNewPacketAsCurrent();
 		StartCallback();
 		{
@@ -237,7 +237,7 @@ void CommunicationLinkViaSocket::run()
 	}
 	TimeValue sNochEins = {0, 1000000};
 	while ( schedule() && bIsInsideCallback )	// solange der letzte Callback nicht beendet ist
-		sleep( sNochEins );
+		wait( sNochEins );
 
     StartCallback();
 	{
@@ -548,7 +548,7 @@ void CommunicationManagerServerAcceptThread::run()
 
 				TimeValue sNochEins = {0, 100};
 				while ( schedule() && xmNewConnection.Is() )	// Solange die letzte Connection nicht abgeholt wurde warten wir
-					sleep( sNochEins );
+					wait( sNochEins );
 				xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket );
 				xmNewConnection->StartCallback();
 				{
diff --git a/automation/source/server/server.hxx b/automation/source/server/server.hxx
index ffbe5b3..f5737be 100644
--- automation/source/server/server.hxx
+++ automation/source/server/server.hxx
@@ -35,7 +35,7 @@
 #ifndef _SERVER_HXX
 #define _SERVER_HXX
 
-/*#include <vos/thread.hxx>
+/*#include <osl/thread.hxx>
 #ifndef _STD_NO_NAMESPACE
 namespace vos
 {
diff --git a/automation/source/testtool/tcommuni.hxx b/automation/source/testtool/tcommuni.hxx
index 5294f5b..76f7d8a 100644
--- automation/source/testtool/tcommuni.hxx
+++ automation/source/testtool/tcommuni.hxx
@@ -37,7 +37,7 @@
 #include <tools/link.hxx>
 #include <svtools/svarray.hxx>
 
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 #ifndef _STRING_LIST
 DECLARE_LIST( StringList, String * )
diff --git a/binfilter/bf_forms/source/component/EventThread.hxx b/binfilter/bf_forms/source/component/EventThread.hxx
index 142ff29..72d33ca 100644
--- binfilter/bf_forms/source/component/EventThread.hxx
+++ binfilter/bf_forms/source/component/EventThread.hxx
@@ -37,7 +37,7 @@
 #define _FRM_EVENT_THREAD_HXX_
 
 #include <com/sun/star/awt/XControl.hpp>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 
 #ifndef _OSL_CONDITN_HXX_
@@ -67,7 +67,7 @@ namespace frm
 // ***************************************************************************************************
 // ***************************************************************************************************
 
-typedef ::vos::OThread	OComponentEventThread_TBASE;
+typedef ::osl::Thread	OComponentEventThread_TBASE;
 class OComponentEventThread
 			:public OComponentEventThread_TBASE
 			,public ::com::sun::star::lang::XEventListener
@@ -126,8 +126,8 @@ public:
 	virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
 
 /* resolve ambiguity : both OWeakObject and OObject have these memory operators */
-	void * SAL_CALL operator new( size_t size ) throw() { return OThread::operator new(size); }
-	void SAL_CALL operator delete( void * p ) throw() { OThread::operator delete(p); }
+	void * SAL_CALL operator new( size_t size ) throw() { return osl::Thread::operator new(size); }
+	void SAL_CALL operator delete( void * p ) throw() { osl::Thread::operator delete(p); }
 
 private:
 	void	implStarted( );
diff --git a/binfilter/bf_forms/source/component/forms_EventThread.cxx b/binfilter/bf_forms/source/component/forms_EventThread.cxx
index b49d2a7..718f7b8 100644
--- binfilter/bf_forms/source/component/forms_EventThread.cxx
+++ binfilter/bf_forms/source/component/forms_EventThread.cxx
@@ -170,7 +170,8 @@ void OComponentEventThread::implTerminated( )
 
 void SAL_CALL OComponentEventThread::kill()
 {
-	OComponentEventThread_TBASE::kill();
+	OComponentEventThread_TBASE::terminate();
+	OComponentEventThread_TBASE::join();
 
 	implTerminated( );
 }
diff --git a/binfilter/bf_sc/source/core/data/sc_documen3.cxx b/binfilter/bf_sc/source/core/data/sc_documen3.cxx
index affded4..d3eed7e 100644
--- binfilter/bf_sc/source/core/data/sc_documen3.cxx
+++ binfilter/bf_sc/source/core/data/sc_documen3.cxx
@@ -429,7 +429,7 @@ using namespace ::com::sun::star;
 /*?*/ 				//	let the thread that called BroadcastUno continue
 /*?*/ 				while ( bInUnoBroadcast )
 /*?*/ 				{
-/*?*/ 					vos::OThread::yield();
+/*?*/ 					osl::Thread::yield();
 /*?*/ 				}
 /*?*/ 			}
 /*N*/ 		}
diff --git a/binfilter/bf_svx/source/inc/trace.hxx b/binfilter/bf_svx/source/inc/trace.hxx
index 7013363..c6de8b5 100644
--- binfilter/bf_svx/source/inc/trace.hxx
+++ binfilter/bf_svx/source/inc/trace.hxx
@@ -44,7 +44,7 @@ class Tracer
 {
 	ByteString m_sBlockDescription;
 
-	DECLARE_STL_STDKEY_MAP( ::vos::OThread::TThreadIdentifier, sal_Int32, MapThreadId2Int );
+	DECLARE_STL_STDKEY_MAP( ::oslThreadIdentifier, sal_Int32, MapThreadId2Int );
 	static MapThreadId2Int s_aThreadIndents;
 
 	static ::vos::OMutex	s_aMapSafety;
diff --git a/configmgr/inc/pch/precompiled_configmgr.hxx b/configmgr/inc/pch/precompiled_configmgr.hxx
index c74b718..13f06d4 100644
--- configmgr/inc/pch/precompiled_configmgr.hxx
+++ configmgr/inc/pch/precompiled_configmgr.hxx
@@ -246,7 +246,7 @@
 #include "rtl/ref.hxx"
 #include "salhelper/simplereferenceobject.hxx"
 #include "vos/socket.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 #include "vos/timer.hxx"
 //---MARKER---
 
diff --git a/configmgr/source/treecache/invalidatetree.cxx b/configmgr/source/treecache/invalidatetree.cxx
index 5a98bb9..46b1280 100644
--- configmgr/source/treecache/invalidatetree.cxx
+++ configmgr/source/treecache/invalidatetree.cxx
@@ -68,8 +68,8 @@
 #include <com/sun/star/container/NoSuchElementException.hpp>
 #endif
 
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #ifndef INCLUDED_ALGORITHM
@@ -140,7 +140,7 @@ std::auto_ptr<ISubtree> TreeManager::loadNodeFromSession( AbsolutePath const& _a
 #endif
 // -----------------------------------------------------------------------------
 
-class OInvalidateTreeThread: public vos::OThread
+class OInvalidateTreeThread: public osl::Thread
 {
     typedef backend::ICachedDataProvider CacheManager;
 	typedef rtl::Reference< CacheManager > CacheManagerRef;
diff --git a/configmgr/workben/local_io/simpletest.cxx b/configmgr/workben/local_io/simpletest.cxx
index 0eca65e..182630e 100644
--- configmgr/workben/local_io/simpletest.cxx
+++ configmgr/workben/local_io/simpletest.cxx
@@ -106,8 +106,8 @@
 
 #include <com/sun/star/xml/sax/InputSource.hpp>
 
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #include <vos/pipe.hxx>
diff --git a/configmgr/workben/local_io/xmlimport.cxx b/configmgr/workben/local_io/xmlimport.cxx
index 4802db8..b379082 100644
--- configmgr/workben/local_io/xmlimport.cxx
+++ configmgr/workben/local_io/xmlimport.cxx
@@ -105,8 +105,8 @@
 
 #include <com/sun/star/xml/sax/InputSource.hpp>
 
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #include <vos/pipe.hxx>
diff --git a/cppu/test/testthreadpool.cxx b/cppu/test/testthreadpool.cxx
index da6ee56..d8df4af 100644
--- cppu/test/testthreadpool.cxx
+++ cppu/test/testthreadpool.cxx
@@ -45,14 +45,14 @@
 
 #include <uno/threadpool.h>
 
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 #define TEST_ENSURE OSL_ENSURE
 
 using namespace ::vos;
 
 
-class OThread1 : public OThread
+class OThread1 : public osl::Thread
 {
 public:
 	OThread1( sal_uInt8 *pCallerUuid );
diff --git a/dbaccess/inc/pch/precompiled_dbaccess.hxx b/dbaccess/inc/pch/precompiled_dbaccess.hxx
index 4465046..d8b7f38 100644
--- dbaccess/inc/pch/precompiled_dbaccess.hxx
+++ dbaccess/inc/pch/precompiled_dbaccess.hxx
@@ -505,7 +505,7 @@
 #include "vos/mutex.hxx"
 #include "rtl/ref.hxx"
 #include "salhelper/simplereferenceobject.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 
 #include "xmloff/ProgressBarHelper.hxx"
 #include "xmloff/XMLConstantsPropertyHandler.hxx"
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 0edadbd..292d5b3 100644
--- dbaccess/source/ui/browser/sbagrid.cxx
+++ dbaccess/source/ui/browser/sbagrid.cxx
@@ -567,7 +567,7 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ )
 	SbaGridControl* pGrid = static_cast< SbaGridControl* >( GetWindow() );
 	if ( pGrid )	// if this fails, we were disposing before arriving here
 	{
-		if ( Application::GetMainThreadIdentifier() != ::vos::OThread::getCurrentIdentifier() )
+		if ( Application::GetMainThreadIdentifier() != ::osl::Thread::getCurrentIdentifier() )
 		{
 			// still not in the main thread (see SbaXGridPeer::dispatch). post an event, again
 			// without moving the special even to the back of the queue
@@ -607,7 +607,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
 	if (!pGrid)
 		return;
 
-	if ( Application::GetMainThreadIdentifier() != ::vos::OThread::getCurrentIdentifier() )
+	if ( Application::GetMainThreadIdentifier() != ::osl::Thread::getCurrentIdentifier() )
 	{
 		// we're not in the main thread. This is bad, as we want to raise windows here,
 		// and VCL does not like windows to be opened in non-main threads (at least on Win32).
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 7cde4b8..fa0dcda 100644
--- dbaccess/source/ui/inc/brwctrlr.hxx
+++ dbaccess/source/ui/inc/brwctrlr.hxx
@@ -90,8 +90,8 @@
 #ifndef _OSL_MUTEX_HXX_
 #include <osl/mutex.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _SFXCANCEL_HXX
 #include <svtools/cancel.hxx>
@@ -159,7 +159,7 @@ namespace dbaui
 		String					m_sStateUndoRecord;
 
 		// members for asynchronous load operations
-		::vos::OThread*			m_pLoadThread;			// the thread wherein the form is loaded
+		::osl::Thread*			m_pLoadThread;			// the thread wherein the form is loaded
 		FormControllerImpl*		m_pFormControllerImpl;	// implementing the XFormController
 
 		sal_uInt32				m_nPendingLoadFinished;			// the event used to tell ourself that the load is finished
@@ -409,7 +409,7 @@ namespace dbaui
 	//==================================================================
 	// LoadFormThread - a thread for asynchronously loading a form
 	//==================================================================
-	class LoadFormThread : public ::vos::OThread
+	class LoadFormThread : public ::osl::Thread
 	{
 		::osl::Mutex	m_aAccessSafety;		// for securing the multi-thread access
 		::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > 				m_xRowSet;			// the data source to be loaded
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 01f7cff..b67c3fd 100644
--- desktop/source/app/officeipcthread.cxx
+++ desktop/source/app/officeipcthread.cxx
@@ -818,7 +818,7 @@ void SAL_CALL OfficeIPCThread::run()
 			TimeValue tval;
 			tval.Seconds = 1;
 			tval.Nanosec = 0;
-			sleep( tval );
+			wait( tval );
 		}
 	} while( schedule() );
 }
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index 30e6a97..1486974 100644
--- desktop/source/app/officeipcthread.hxx
+++ desktop/source/app/officeipcthread.hxx
@@ -49,8 +49,8 @@
 #ifndef _VOS_SECURITY_HXX_
 #include <vos/security.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_SIGNAL_HXX_
 #include <vos/signal.hxx>
@@ -90,7 +90,7 @@ struct ProcessDocumentsRequest
 };
 
 class DispatchWatcher;
-class OfficeIPCThread : public vos::OThread
+class OfficeIPCThread : public osl::Thread
 {
   private:
 	static OfficeIPCThread*		pGlobalOfficeIPCThread;
diff --git a/extensions/inc/pch/precompiled_extensions.hxx b/extensions/inc/pch/precompiled_extensions.hxx
index 4bfa679..1572a21 100644
--- extensions/inc/pch/precompiled_extensions.hxx
+++ extensions/inc/pch/precompiled_extensions.hxx
@@ -551,7 +551,7 @@
 #include "vos/pipe.hxx"
 #include "rtl/ref.hxx"
 #include "salhelper/simplereferenceobject.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 #include "vos/timer.hxx"
 
 #include "xmloff/nmspmap.hxx"
diff --git a/extensions/source/ole/olethread.cxx b/extensions/source/ole/olethread.cxx
index dda9c17..8bade92 100644
--- extensions/source/ole/olethread.cxx
+++ extensions/source/ole/olethread.cxx
@@ -44,7 +44,7 @@
 #include <tools/presys.h>
 #include <tools/postsys.h>
 
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 using namespace vos;
 using namespace std;
diff --git a/extensions/source/plugin/inc/plugin/unx/mediator.hxx b/extensions/source/plugin/inc/plugin/unx/mediator.hxx
index 7286244..cbcc327 100644
--- extensions/source/plugin/inc/plugin/unx/mediator.hxx
+++ extensions/source/plugin/inc/plugin/unx/mediator.hxx
@@ -56,8 +56,8 @@
 #ifndef _VOS_CONDITN_HXX_
 #include <vos/conditn.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
@@ -174,7 +174,7 @@ public:
 		}
 };
 
-class MediatorListener : public NAMESPACE_VOS( OThread )
+class MediatorListener : public osl::Thread
 {
 	friend class Mediator;
   private:
diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx
index 46197fd..7d2ad90 100644
--- extensions/source/scanner/scanunx.cxx
+++ extensions/source/scanner/scanunx.cxx
@@ -37,7 +37,7 @@
 #include "precompiled_extensions.hxx"
 #include <scanner.hxx>
 #include <sanedlg.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <tools/list.hxx>
 
 #if OSL_DEBUG_LEVEL > 1
@@ -132,7 +132,7 @@ static vos::OMutex		aSaneProtector;
 // - ScannerThread -
 // -----------------
 
-class ScannerThread : public vos::OThread
+class ScannerThread : public osl::Thread
 {
 	SaneHolder*									m_pHolder;
 	REF( com::sun::star::lang::XEventListener )	m_xListener;
diff --git a/extensions/test/stm/datatest.cxx b/extensions/test/stm/datatest.cxx
index fa3344c..69c0d82 100644
--- extensions/test/stm/datatest.cxx
+++ extensions/test/stm/datatest.cxx
@@ -55,7 +55,7 @@
 
 #include <vos/conditn.hxx>
 #include <vos/mutex.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 #if OSL_DEBUG_LEVEL == 0
 #define NDEBUG
diff --git a/extensions/test/stm/marktest.cxx b/extensions/test/stm/marktest.cxx
index 711a5b0..994cbba 100644
--- extensions/test/stm/marktest.cxx
+++ extensions/test/stm/marktest.cxx
@@ -51,7 +51,7 @@
 
 #include <vos/conditn.hxx>
 #include <vos/mutex.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 #if OSL_DEBUG_LEVEL == 0
 #define NDEBUG
diff --git a/extensions/test/stm/pipetest.cxx b/extensions/test/stm/pipetest.cxx
index b064de8..41d9c22 100644
--- extensions/test/stm/pipetest.cxx
+++ extensions/test/stm/pipetest.cxx
@@ -48,7 +48,7 @@
 
 #include <vos/conditn.hxx>
 #include <vos/mutex.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 #if OSL_DEBUG_LEVEL == 0
 #define NDEBUG
@@ -66,7 +66,7 @@ using namespace usr;
 #endif
 
 class WriteToStreamThread :
-		public OThread
+		public osl::Thread
 {
 
 public:
@@ -381,7 +381,7 @@ void OPipeTest::testMultithreading( const XInterfaceRef &r )
 	Sequence<BYTE> seqRead;
 
 	// deletes itself
-	OThread *p = new WriteToStreamThread( output,  iMax );
+	osl::Thread *p = new WriteToStreamThread( output,  iMax );
 
 	ERROR_ASSERT( p , "couldn't create thread for testing !\n" );
 
diff --git a/forms/inc/pch/precompiled_forms.hxx b/forms/inc/pch/precompiled_forms.hxx
index 58f0616..80edef2 100644
--- forms/inc/pch/precompiled_forms.hxx
+++ forms/inc/pch/precompiled_forms.hxx
@@ -403,6 +403,6 @@
 #include "vcl/wintypes.hxx"
 
 #include "vos/mutex.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 //---MARKER---
 #endif
diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx
index 16a4d3c..042c0cc 100644
--- forms/source/component/EventThread.cxx
+++ forms/source/component/EventThread.cxx
@@ -176,7 +176,8 @@ void OComponentEventThread::implTerminated( )
 
 void SAL_CALL OComponentEventThread::kill()
 {
-	OComponentEventThread_TBASE::kill();
+	OComponentEventThread_TBASE::terminate();
+	OComponentEventThread_TBASE::join();
 
 	implTerminated( );
 }
diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx
index e9ef68c..68c511d 100644
--- forms/source/component/EventThread.hxx
+++ forms/source/component/EventThread.hxx
@@ -40,7 +40,7 @@
 #include <com/sun/star/lang/EventObject.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/awt/XControl.hpp>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 
 #ifndef _OSL_CONDITN_HXX_
@@ -66,7 +66,7 @@ namespace frm
 // ***************************************************************************************************
 // ***************************************************************************************************
 
-typedef ::vos::OThread	OComponentEventThread_TBASE;
+typedef ::osl::Thread	OComponentEventThread_TBASE;
 class OComponentEventThread
 			:public OComponentEventThread_TBASE
 			,public ::com::sun::star::lang::XEventListener
@@ -125,8 +125,8 @@ public:
 	virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException);
 
 /* resolve ambiguity : both OWeakObject and OObject have these memory operators */
-	void * SAL_CALL operator new( size_t size ) throw() { return OThread::operator new(size); }
-	void SAL_CALL operator delete( void * p ) throw() { OThread::operator delete(p); }
+	void * SAL_CALL operator new( size_t size ) throw() { return osl::Thread::operator new(size); }
+	void SAL_CALL operator delete( void * p ) throw() { osl::Thread::operator delete(p); }
 
 private:
 	void	implStarted( );
diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx
index 6d31ef7..4baf72a 100644
--- framework/inc/pch/precompiled_framework.hxx
+++ framework/inc/pch/precompiled_framework.hxx
@@ -495,7 +495,7 @@
 
 #include "vos/mutex.hxx"
 #include "rtl/ref.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 #include "vos/timer.hxx"
 
 //---MARKER---
diff --git a/framework/test/threadtest.cxx b/framework/test/threadtest.cxx
index 434eecb..a4b1acf 100644
--- framework/test/threadtest.cxx
+++ framework/test/threadtest.cxx
@@ -88,8 +88,8 @@
 #include <osl/process.h>
 #endif
 
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #ifndef _RTL_USTRING_
@@ -538,7 +538,7 @@ sal_Int32 ThreadSafeClass::workA(	sal_Int32	nA			,
 			Otherwise all threads are sychron after first 2,3...5 calls - I think!
 *//*-*****************************************************************************************************/
 
-class TestThread : public OThread
+class TestThread : public osl::Thread
 {
 	public:
 
diff --git a/framework/test/threadtest/threadtest.cxx b/framework/test/threadtest/threadtest.cxx
index b463d1d..21b120a 100644
--- framework/test/threadtest/threadtest.cxx
+++ framework/test/threadtest/threadtest.cxx
@@ -88,8 +88,8 @@
 #include <osl/process.h>
 #endif
 
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #ifndef _RTL_USTRING_
@@ -536,7 +536,7 @@ sal_Int32 ThreadSafeClass::workA(	sal_Int32	nA			,
 			Otherwise all threads are sychron after first 2,3...5 calls - I think!
 *//*-*****************************************************************************************************/
 
-class TestThread : public OThread
+class TestThread : public osl::Thread
 {
 	public:
 
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 8e332dd..b4f8888 100644
--- linguistic/source/lngopt.cxx
+++ linguistic/source/lngopt.cxx
@@ -84,7 +84,7 @@ using namespace com::sun::star::registry;
 
 // static member intialization
 SvtLinguOptions *	LinguOptions::pData	= NULL;
-vos::ORefCount		LinguOptions::aRefCount;
+oslInterlockedCount	LinguOptions::nRefCount;
 
 
 LinguOptions::LinguOptions()
@@ -96,14 +96,14 @@ LinguOptions::LinguOptions()
 		aLinguCfg.GetOptions( *pData );
 	}
 
-	++aRefCount;
+	osl_incrementInterlockedCount( &nRefCount );
 }
 
 
 LinguOptions::LinguOptions(const LinguOptions & /*rOpt*/)
 {
 	DBG_ASSERT( pData, "lng : data missing" );
-	++aRefCount;
+	osl_incrementInterlockedCount( &nRefCount );
 }
 
 
@@ -111,7 +111,7 @@ LinguOptions::~LinguOptions()
 {
 	MutexGuard	aGuard( GetLinguMutex() );
 
-	if (--aRefCount == 0)
+	if ( osl_decrementInterlockedCount( &nRefCount ) == 0 )
 	{
 		delete pData;	pData  = NULL;
 	}
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index 9d635fb..8fd6f6f 100644
--- linguistic/source/lngopt.hxx
+++ linguistic/source/lngopt.hxx
@@ -108,7 +108,7 @@ namespace com { namespace sun { namespace star {
 class LinguOptions
 {
 	static SvtLinguOptions	   *pData;
-	static vos::ORefCount		aRefCount;	// number of objects of this class
+	static oslInterlockedCount	nRefCount;	// number of objects of this class
 
 	//! uses default assignment-operator
 
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index fa1e026..23dee40 100644
--- sc/source/core/data/documen3.cxx
+++ sc/source/core/data/documen3.cxx
@@ -785,7 +785,7 @@ void ScDocument::RemoveUnoObject( SfxListener& rObject )
 				//	let the thread that called BroadcastUno continue
 				while ( bInUnoBroadcast )
 				{
-					vos::OThread::yield();
+					osl::Thread::yield();
 				}
 			}
 		}
diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx
index 28c6650..7f5d399 100644
--- sc/source/filter/inc/filt_pch.hxx
+++ sc/source/filter/inc/filt_pch.hxx
@@ -237,7 +237,7 @@
 #include <com/sun/star/container/NoSuchElementException.hdl>
 #include <com/sun/star/container/NoSuchElementException.hpp>
 #include <vcl/svapp.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <vos/runnable.hxx>
 #include <salhelper/simplereferenceobject.hxx>
 #include <vcl/apptypes.hxx>
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 7563732..790e2ca 100644
--- sd/inc/pch/precompiled_sd.hxx
+++ sd/inc/pch/precompiled_sd.hxx
@@ -921,7 +921,7 @@
 #include "osl/diagnose.h"
 #include "vos/module.hxx"
 #include "vos/mutex.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 #include "vos/xception.hxx"
 //---MARKER---
 
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index e8bffb4..872402f 100644
--- sd/source/ui/dlg/filedlg.cxx
+++ sd/source/ui/dlg/filedlg.cxx
@@ -91,8 +91,8 @@
 #include <tools/urlobj.hxx>
 #endif
 
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_MUTEX_HXX_
 #include <vos/mutex.hxx>
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 1016400..6ca2c6b 100644
--- sfx2/inc/pch/precompiled_sfx2.hxx
+++ sfx2/inc/pch/precompiled_sfx2.hxx
@@ -675,7 +675,7 @@
 #include "vos/mutex.hxx"
 #include "vos/security.hxx"
 #include "vos/socket.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 #include "vos/xception.hxx"
 //---MARKER---
 #endif
diff --git a/sfx2/source/appl/updatedlg.cxx b/sfx2/source/appl/updatedlg.cxx
index bc651a2..4a13e68 100644
--- sfx2/source/appl/updatedlg.cxx
+++ sfx2/source/appl/updatedlg.cxx
@@ -60,7 +60,7 @@
 
 #include <rtl/ustrbuf.hxx>
 #include <rtl/uri.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <vos/mutex.hxx>
 #include <comphelper/processfactory.hxx>
 #include <vcl/msgbox.hxx>
@@ -170,8 +170,8 @@ void CheckUpdateInfo::release()
 
 // ------------------------------------------------------------------
 
-// class OThread
-class OCheckForUpdate : public ::vos::OThread
+// class osl::Thread
+class OCheckForUpdate : public ::osl::Thread
 {
 	public:
         OCheckForUpdate( const ::rtl::Reference< CheckUpdateInfo >& aUpdateInfo,
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index a787d24..499b880 100644
--- sfx2/source/dialog/filedlghelper.cxx
+++ sfx2/source/dialog/filedlghelper.cxx
@@ -138,8 +138,8 @@
 #ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
 #include <unotools/localfilehelper.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_MUTEX_HXX_
 #include <vos/mutex.hxx>
@@ -1261,7 +1261,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
 
 #define nMagic -1
 
-class PickerThread_Impl : public ::vos::OThread
+class PickerThread_Impl : public ::osl::Thread
 {
 	uno::Reference < XFilePicker > mxPicker;
 	::vos::OMutex			maMutex;
diff --git a/sfx2/source/dialog/mailmodelapi.cxx b/sfx2/source/dialog/mailmodelapi.cxx
index accebf9..0e7dc09 100644
--- sfx2/source/dialog/mailmodelapi.cxx
+++ sfx2/source/dialog/mailmodelapi.cxx
@@ -109,8 +109,8 @@
 #ifndef _COMPHELPER_MEDIADESCRIPTOR_HXX_
 #include <comphelper/mediadescriptor.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _SV_MSGBOX_HXX
 #include <vcl/msgbox.hxx>
@@ -209,8 +209,8 @@ namespace
 
 }
 
-// class OThread
-class OMailSendThreadImpl : public ::vos::OThread
+// class osl::Thread
+class OMailSendThreadImpl : public ::osl::Thread
 {
 	public:
 		OMailSendThreadImpl(
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 2126fc4..577f706 100644
--- sfx2/source/doc/doctempl.cxx
+++ sfx2/source/doc/doctempl.cxx
@@ -45,8 +45,8 @@
 #ifndef _VOS_MUTEX_HXX_
 #include <vos/mutex.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #ifndef _SV_RESARY_HXX
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 52b91a7..12af260 100644
--- sfx2/source/doc/doctemplates.cxx
+++ sfx2/source/doc/doctemplates.cxx
@@ -363,7 +363,7 @@ public:
 
 //=============================================================================
 
-class Updater_Impl : public ::vos::OThread
+class Updater_Impl : public ::osl::Thread
 {
 private:
     SfxDocTplService_Impl   *mpDocTemplates;
@@ -1196,7 +1196,8 @@ SfxDocTplService_Impl::~SfxDocTplService_Impl()
 
     if ( mpUpdater )
     {
-        mpUpdater->kill();
+        mpUpdater->terminate();
+        mpUpdater->join();
         delete mpUpdater;
     }
 }
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index ccc9dd2..86a395a 100644
--- sfx2/source/inet/inettbc.cxx
+++ sfx2/source/inet/inettbc.cxx
@@ -70,8 +70,8 @@
 #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
 #include <toolkit/unohlp.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX //autogen
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_MUTEX_HXX //autogen
 #include <vos/mutex.hxx>
diff --git a/shell/source/backends/gconfbe/gconfbackend.hxx b/shell/source/backends/gconfbe/gconfbackend.hxx
index 10ae515..4079523 100644
--- shell/source/backends/gconfbe/gconfbackend.hxx
+++ shell/source/backends/gconfbe/gconfbackend.hxx
@@ -74,8 +74,8 @@
 #include <map>
 #define INCLUDED_MAP
 #endif
-//#ifndef _VOS_THREAD_HXX_
-//#include <vos/thread.hxx>
+//#ifndef _THREAD_HXX_
+//#include <osl/thread.hxx>
 //#endif
 
 #include <gconf/gconf-client.h>
@@ -112,7 +112,7 @@ typedef std::multimap<rtl::OUString, rtl::OUString>  TSMappingTable;
 //------------------------------------------------------------------------------
 
 /*
-class ONotificationThread: public vos::OThread
+class ONotificationThread: public osl::Thread
 {
    
 
diff --git a/so3/source/persist/transprt.cxx b/so3/source/persist/transprt.cxx
index afc3f84..36ceefc 100644
--- so3/source/persist/transprt.cxx
+++ so3/source/persist/transprt.cxx
@@ -1251,7 +1251,7 @@ sal_Int64 SAL_CALL UcbTransportInputStream_Impl::getLength (void)
  *
  *======================================================================*/
 
-class TransportThread_Impl : public ::vos::OThread
+class TransportThread_Impl : public ::osl::Thread
 {
     Link            m_aLink;
 public:
diff --git a/starmath/source/math_pch.cxx b/starmath/source/math_pch.cxx
index 45dbedf..598d33a 100644
--- starmath/source/math_pch.cxx
+++ starmath/source/math_pch.cxx
@@ -151,7 +151,7 @@
 #include <svtools/poolitem.hxx>
 #include <svtools/args.hxx>
 #include <smmod.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <osl/thread.h>
 #include <vos/runnable.hxx>
 #include <vcl/apptypes.hxx>
diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx
index 2e06f3e..cb4c4c9 100644
--- svtools/inc/pch/precompiled_svtools.hxx
+++ svtools/inc/pch/precompiled_svtools.hxx
@@ -434,7 +434,7 @@
 #include <rtl/ref.hxx>
 #include <salhelper/simplereferenceobject.hxx>
 #include <vos/security.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <vos/timer.hxx>
 
 //---MARKER---
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 9b3f1f7..ba5df8b 100644
--- svtools/source/control/inettbc.cxx
+++ svtools/source/control/inettbc.cxx
@@ -91,8 +91,8 @@
 #endif
 
 #include <vcl/toolbox.hxx>
-#ifndef _VOS_THREAD_HXX //autogen
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_MUTEX_HXX //autogen
 #include <vos/mutex.hxx>
@@ -179,7 +179,7 @@ public:
 };
 
 // -----------------------------------------------------------------------
-class SvtMatchContext_Impl : public ::vos::OThread
+class SvtMatchContext_Impl : public ::osl::Thread
 {
     static ::vos::OMutex*           pDirMutex;
 
diff --git a/svx/inc/galdlg.hxx b/svx/inc/galdlg.hxx
index e3c5983..c0ec88e 100644
--- svx/inc/galdlg.hxx
+++ svx/inc/galdlg.hxx
@@ -37,7 +37,7 @@
 #define _SVX_GALDLG_HXX_
 
 
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <bootstrp/sstring.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/graph.hxx>
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 69bd6d2..050f7f2 100644
--- svx/inc/pch/precompiled_svx.hxx
+++ svx/inc/pch/precompiled_svx.hxx
@@ -955,7 +955,7 @@
 #include "vos/mutex.hxx"
 #include "rtl/ref.hxx"
 #include "salhelper/simplereferenceobject.hxx"
-#include "vos/thread.hxx"
+#include "osl/thread.hxx"
 #include "vos/xception.hxx"
 #include "xmloff/DashStyle.hxx"
 #include "xmloff/GradientStyle.hxx"
diff --git a/svx/source/dialog/cuigaldlg.hxx b/svx/source/dialog/cuigaldlg.hxx
index d7a0246..4ad79b2 100644
--- svx/source/dialog/cuigaldlg.hxx
+++ svx/source/dialog/cuigaldlg.hxx
@@ -36,7 +36,7 @@
 #ifndef _CUI_GALDLG_HXX_
 #define _CUI_GALDLG_HXX_
 
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/graph.hxx>
 #include <vcl/fixed.hxx>
@@ -86,7 +86,7 @@ struct FilterEntry
 // - SearchThread -
 // ----------------
 
-class SearchThread : public ::vos::OThread
+class SearchThread : public ::osl::Thread
 {
 private:
 
@@ -143,7 +143,7 @@ public:
 // - TakeThread -
 // --------------
 
-class TakeThread : public ::vos::OThread
+class TakeThread : public ::osl::Thread
 {
 private:
 
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 6c7da45..fd13132 100644
--- svx/source/fmcomp/gridctrl.cxx
+++ svx/source/fmcomp/gridctrl.cxx
@@ -3614,7 +3614,7 @@ void DbGridControl::implAdjustInSolarThread(BOOL _bRows)
 {
 	TRACE_RANGE("DbGridControl::implAdjustInSolarThread");
 	::osl::MutexGuard aGuard(m_aAdjustSafety);
-	if (::vos::OThread::getCurrentIdentifier() != Application::GetMainThreadIdentifier())
+	if (::osl::Thread::getCurrentIdentifier() != Application::GetMainThreadIdentifier())
 	{
 		m_nAsynAdjustEvent = PostUserEvent(LINK(this, DbGridControl, OnAsyncAdjust), reinterpret_cast< void* >( _bRows ));
 		m_bPendingAdjustRows = _bRows;
diff --git a/svx/source/fmcomp/trace.cxx b/svx/source/fmcomp/trace.cxx
index a988dec..c0d41ed 100644
--- svx/source/fmcomp/trace.cxx
+++ svx/source/fmcomp/trace.cxx
@@ -49,7 +49,7 @@
 
 //------------------------------------------------------------------------------
 ::vos::OMutex Tracer::s_aMapSafety;
-map< ::vos::OThread::TThreadIdentifier, INT32, ::std::less< ::vos::OThread::TThreadIdentifier > >
+map< ::oslThreadIdentifier, INT32, ::std::less< ::oslThreadIdentifier > >
 		Tracer::s_aThreadIndents;
 
 //------------------------------------------------------------------------------
@@ -57,13 +57,13 @@ Tracer::Tracer(const char* _pBlockDescription)
 	:m_sBlockDescription(_pBlockDescription)
 {
 	::vos::OGuard aGuard(s_aMapSafety);
-	INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ]++;
+	INT32 nIndent = s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ]++;
 
 	ByteString sIndent;
 	while (nIndent--)
 		sIndent += '\t';
 
-    ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) );
+    ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) );
 	sThread += '\t';
 
 	ByteString sMessage(sThread);
@@ -77,13 +77,13 @@ Tracer::Tracer(const char* _pBlockDescription)
 Tracer::~Tracer()
 {
 	::vos::OGuard aGuard(s_aMapSafety);
-	INT32 nIndent = --s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ];
+	INT32 nIndent = --s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ];
 
 	ByteString sIndent;
 	while (nIndent--)
 		sIndent += '\t';
 
-    ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) );
+    ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) );
 	sThread += '\t';
 
 	ByteString sMessage(sThread);
@@ -97,13 +97,13 @@ Tracer::~Tracer()
 void Tracer::TraceString(const char* _pMessage)
 {
 	::vos::OGuard aGuard(s_aMapSafety);
-	INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ];
+	INT32 nIndent = s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ];
 
 	ByteString sIndent;
 	while (nIndent--)
 		sIndent += '\t';
 
-    ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) );
+    ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) );
 	sThread += '\t';
 
 	ByteString sMessage(sThread);
@@ -118,13 +118,13 @@ void Tracer::TraceString(const char* _pMessage)
 void Tracer::TraceString1StringParam(const char* _pMessage, const char* _pParam)
 {
 	::vos::OGuard aGuard(s_aMapSafety);
-	INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ];
+	INT32 nIndent = s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ];
 
 	ByteString sIndent;
 	while (nIndent--)
 		sIndent += '\t';
 
-    ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) );
+    ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) );
 	sThread += '\t';
 
 	ByteString sMessage(sThread);
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 9040ddc..8fa2145 100644
--- svx/source/form/fmshimp.cxx
+++ svx/source/form/fmshimp.cxx
@@ -3244,7 +3244,7 @@ void FmXFormShell::DoAsyncCursorAction(const Reference< XResultSet>& _xForm, CUR
 	rDesc.pThread->create();
 
 	// set a priority slightly below normal
-	rDesc.pThread->setPriority(::vos::OThread::TPriority_BelowNormal);
+	rDesc.pThread->setPriority(osl_Thread_PriorityBelowNormal);
 }
 
 //------------------------------------------------------------------------------
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 6513cd1..b2d143a 100644
--- svx/source/form/fmsrcimp.cxx
+++ svx/source/form/fmsrcimp.cxx
@@ -1275,7 +1275,7 @@ void FmSearchEngine::ImplStartNextSearch()
         pSearcher->setTerminationHandler(LINK(this, FmSearchEngine, OnSearchTerminated));
 
         pSearcher->createSuspended();
-        pSearcher->setPriority(::vos::OThread::TPriority_Lowest);
+        pSearcher->setPriority(osl_Thread_PriorityLowest);
         pSearcher->resume();
     }
     else
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index db620f1..b1a95f7 100644
--- svx/source/inc/fmshimp.hxx
+++ svx/source/inc/fmshimp.hxx
@@ -138,8 +138,8 @@
 #ifndef _OSL_MUTEX_HXX_
 #include <osl/mutex.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_ //autogen
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _SFXCANCEL_HXX //autogen
 #include <svtools/cancel.hxx>
@@ -715,7 +715,7 @@ public:
 // FmCursorActionThread
 //==================================================================
 
-class SAL_DLLPRIVATE FmCursorActionThread : public ::vos::OThread
+class SAL_DLLPRIVATE FmCursorActionThread : public ::osl::Thread
 {
 	Link					m_aTerminationHandler;		// the handler to be called upon termination
 	::com::sun::star::sdbc::SQLException			m_aRunException;			// the database exception thrown by RunImpl
diff --git a/svx/source/inc/fmsrcimp.hxx b/svx/source/inc/fmsrcimp.hxx
index 8777234..e692b6d 100644
--- svx/source/inc/fmsrcimp.hxx
+++ svx/source/inc/fmsrcimp.hxx
@@ -40,8 +40,8 @@
 #include "fmtools.hxx"
 #endif // _SVX_FMTOOLS_HXX
 
-#ifndef _VOS_THREAD_HXX_ //autogen
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #ifndef _OSL_MUTEX_HXX_ //autogen
@@ -92,7 +92,7 @@ SV_DECL_OBJARR(SvInt32Array, sal_Int32, 16, 16)
 // ===================================================================================================
 
 class FmSearchEngine;
-class FmSearchThread : public ::vos::OThread
+class FmSearchThread : public ::osl::Thread
 {
 	FmSearchEngine*		m_pEngine;
 	Link				m_aTerminationHdl;
diff --git a/svx/source/inc/trace.hxx b/svx/source/inc/trace.hxx
index 4e61198..e1c9169 100644
--- svx/source/inc/trace.hxx
+++ svx/source/inc/trace.hxx
@@ -40,8 +40,8 @@
 #ifndef _STRING_HXX
 #include <tools/string.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX_
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VOS_MUTEX_HXX_
 #include <vos/mutex.hxx>
@@ -55,7 +55,7 @@ class Tracer
 {
 	ByteString m_sBlockDescription;
 
-	DECLARE_STL_STDKEY_MAP( ::vos::OThread::TThreadIdentifier, sal_Int32, MapThreadId2Int );
+	DECLARE_STL_STDKEY_MAP( ::oslThreadIdentifier, sal_Int32, MapThreadId2Int );
 	static MapThreadId2Int s_aThreadIndents;
 
 	static ::vos::OMutex	s_aMapSafety;
diff --git a/unotools/inc/unotools/ucblockbytes.hxx b/unotools/inc/unotools/ucblockbytes.hxx
index 7dc1c86..88cfb98 100644
--- unotools/inc/unotools/ucblockbytes.hxx
+++ unotools/inc/unotools/ucblockbytes.hxx
@@ -17,7 +17,7 @@
 #include "unotools/unotoolsdllapi.h"
 #endif
 
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 #include <vos/conditn.hxx>
 #include <vos/mutex.hxx>
 #include <tools/stream.hxx>
diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h
index 1706b08..698166e 100644
--- vcl/aqua/inc/salinst.h
+++ vcl/aqua/inc/salinst.h
@@ -42,8 +42,8 @@
 #ifndef _VOS_MUTEX_HXX
 #include <vos/mutex.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 
 #include <salsys.h>
@@ -70,7 +70,7 @@ class SalYieldMutex;
 class SalYieldMutex : public vos::OMutex
 {
 	ULONG										mnCount;
-	NAMESPACE_VOS(OThread)::TThreadIdentifier	mnThreadId;
+	oslThreadIdentifier	mnThreadId;
 
 public:
 												SalYieldMutex();
@@ -78,7 +78,7 @@ public:
 	virtual void								release();
 	virtual sal_Bool							tryToAcquire();
 	ULONG										GetAcquireCount() const { return mnCount; }
-	NAMESPACE_VOS(OThread)::TThreadIdentifier	GetThreadId() const { return mnThreadId; }
+	oslThreadIdentifier	GetThreadId() const { return mnThreadId; }
 };
 
 #define YIELD_GUARD vos::OGuard aGuard( GetSalData()->mpFirstInstance->GetYieldMutex() )
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index c388bd1..292f4e8 100644
--- vcl/aqua/source/app/salinst.cxx
+++ vcl/aqua/source/app/salinst.cxx
@@ -248,13 +248,13 @@ SalYieldMutex::SalYieldMutex()
 void SalYieldMutex::acquire()
 {
 	OMutex::acquire();
-	mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+	mnThreadId = osl::Thread::getCurrentIdentifier();
 	mnCount++;
 }
 
 void SalYieldMutex::release()
 {
-	if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+	if ( mnThreadId == osl::Thread::getCurrentIdentifier() )
 	{
 		if ( mnCount == 1 )
 			mnThreadId = 0;
@@ -267,7 +267,7 @@ sal_Bool SalYieldMutex::tryToAcquire()
 {
 	if ( OMutex::tryToAcquire() )
 	{
-		mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+		mnThreadId = osl::Thread::getCurrentIdentifier();
 		mnCount++;
 		return sal_True;
 	}
@@ -413,7 +413,7 @@ ULONG AquaSalInstance::ReleaseYieldMutex()
 {
 	SalYieldMutex* pYieldMutex = mpSalYieldMutex;
 	if ( pYieldMutex->GetThreadId() ==
-		 NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+		 osl::Thread::getCurrentIdentifier() )
 	{
 		ULONG nCount = pYieldMutex->GetAcquireCount();
 		ULONG n = nCount;
diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx
index d4cf547..2d0fb68 100644
--- vcl/inc/vcl/salgdi.hxx
+++ vcl/inc/vcl/salgdi.hxx
@@ -50,8 +50,8 @@
 #ifndef _SV_SALGTYPE_HXX
 #include <vcl/salgtype.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _SV_OUTDEV_HXX
 #include <vcl/outdev.hxx>
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 9492703..cd88a3d 100644
--- vcl/inc/vcl/svapp.hxx
+++ vcl/inc/vcl/svapp.hxx
@@ -36,8 +36,8 @@
 #ifndef _SV_SVAPP_HXX
 #define _SV_SVAPP_HXX
 
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _STRING_HXX
 #include <tools/string.hxx>
@@ -310,7 +310,7 @@ public:
     static void                 Yield( bool bAllEvents = false );
     static void                 EndYield();
     static vos::IMutex&                     GetSolarMutex();
-    static vos::OThread::TThreadIdentifier  GetMainThreadIdentifier();
+    static oslThreadIdentifier  GetMainThreadIdentifier();
     static ULONG                ReleaseSolarMutex();
     static void                 AcquireSolarMutex( ULONG nCount );
 
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index 2bd4b55..c9ba081 100644
--- vcl/inc/vcl/svdata.hxx
+++ vcl/inc/vcl/svdata.hxx
@@ -36,8 +36,8 @@
 #ifndef _SV_SVDATA_HXX
 #define _SV_SVDATA_HXX
 
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _STRING_HXX
 #include <tools/string.hxx>
@@ -354,7 +354,7 @@ struct ImplSVData
     Window*                 mpIntroWindow;      // the splash screen
     DockingManager*         mpDockingManager;
 
-    vos::OThread::TThreadIdentifier                     mnMainThreadId;
+    oslThreadIdentifier                     mnMainThreadId;
     ::com::sun::star::uno::Reference< 
         ::com::sun::star::awt::XDisplayConnection >     mxDisplayConnection;
 
diff --git a/vcl/inc/vcl/unobrok.hxx b/vcl/inc/vcl/unobrok.hxx
index a006609..82593e6 100644
--- vcl/inc/vcl/unobrok.hxx
+++ vcl/inc/vcl/unobrok.hxx
@@ -37,7 +37,7 @@
 #define _UNOBROK_HXX
 
 #include <vcl/svdata.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 namespace vcl_accept
 {
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index d5c8d34..134ca55 100644
--- vcl/source/app/svapp.cxx
+++ vcl/source/app/svapp.cxx
@@ -589,7 +589,7 @@ vos::IMutex& Application::GetSolarMutex()
 
 // -----------------------------------------------------------------------
 
-vos::OThread::TThreadIdentifier Application::GetMainThreadIdentifier()
+oslThreadIdentifier Application::GetMainThreadIdentifier()
 {
     return ImplGetSVData()->mnMainThreadId;
 }
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index eafed42..31572b1 100644
--- vcl/source/app/svmain.cxx
+++ vcl/source/app/svmain.cxx
@@ -374,7 +374,7 @@ BOOL InitVCL( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XM
     pSVData->maAppData.mxMSF = rSMgr;
 
     // Main-Thread-Id merken
-    pSVData->mnMainThreadId = ::vos::OThread::getCurrentIdentifier();
+    pSVData->mnMainThreadId = ::osl::Thread::getCurrentIdentifier();
 
     rtl::OUString       aExeFileName;
 
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 6c3cb34..bcca756 100644
--- vcl/source/helper/threadex.cxx
+++ vcl/source/helper/threadex.cxx
@@ -109,7 +109,7 @@ IMPL_LINK( SolarThreadExecutor, worker, void*, EMPTYARG )
 
 long SolarThreadExecutor::impl_execute( const TimeValue* _pTimeout )
 {
-	if( ::vos::OThread::getCurrentIdentifier() == Application::GetMainThreadIdentifier() )
+	if( ::osl::Thread::getCurrentIdentifier() == Application::GetMainThreadIdentifier() )
 	{
         osl_setCondition( m_aStart );
 		m_nReturn = doIt();
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 1b4b325..b63fa28 100644
--- vcl/unx/gtk/app/gtkdata.cxx
+++ vcl/unx/gtk/app/gtkdata.cxx
@@ -72,6 +72,7 @@
 #include <osl/process.h>
 #endif
 
+#include <osl/conditn.h>
 #include <tools/debug.hxx>
 
 #ifndef _SAL_I18N_INPUTMETHOD_HXX
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index f360169..4bdd988 100644
--- vcl/unx/gtk/app/gtkinst.cxx
+++ vcl/unx/gtk/app/gtkinst.cxx
@@ -82,7 +82,7 @@ void GtkHookedYieldMutex::ThreadsLeave()
 
 #if OSL_DEBUG_LEVEL > 1
 	if( mnThreadId &&
-		mnThreadId != NAMESPACE_VOS(OThread)::getCurrentIdentifier())
+		mnThreadId != osl::Thread::getCurrentIdentifier())
 		fprintf( stderr, "\n\n--- A different thread owns the mutex ...---\n\n\n");
 #endif
 
@@ -225,7 +225,7 @@ GtkYieldMutex::GtkYieldMutex()
 
 void GtkYieldMutex::acquire()
 {
-    vos::OThread::TThreadIdentifier aCurrentThread = vos::OThread::getCurrentIdentifier();
+    oslThreadIdentifier aCurrentThread = osl::Thread::getCurrentIdentifier();
     // protect member manipulation
     OMutex::acquire();
     if( mnCount > 0 && mnThreadId == aCurrentThread )
@@ -248,7 +248,7 @@ void GtkYieldMutex::acquire()
 
 void GtkYieldMutex::release()
 {
-    vos::OThread::TThreadIdentifier aCurrentThread = vos::OThread::getCurrentIdentifier();
+    oslThreadIdentifier aCurrentThread = osl::Thread::getCurrentIdentifier();
     // protect member manipulation
     OMutex::acquire();
     // strange things happen, do nothing if we don't own the mutex
@@ -266,7 +266,7 @@ void GtkYieldMutex::release()
 
 sal_Bool GtkYieldMutex::tryToAcquire()
 {
-    vos::OThread::TThreadIdentifier aCurrentThread = vos::OThread::getCurrentIdentifier();
+    oslThreadIdentifier aCurrentThread = osl::Thread::getCurrentIdentifier();
     // protect member manipulation
     OMutex::acquire();
     if( mnCount > 0 )
@@ -310,9 +310,9 @@ int GtkYieldMutex::Grab()
     OMutex::acquire();
     int nRet = mnCount;
     if( mnCount == 0 ) // recursive else
-        mnThreadId = vos::OThread::getCurrentIdentifier();
+        mnThreadId = osl::Thread::getCurrentIdentifier();
 #if OSL_DEBUG_LEVEL > 1
-    else if( mnThreadId != vos::OThread::getCurrentIdentifier() )
+    else if( mnThreadId != osl::Thread::getCurrentIdentifier() )
     {
         fprintf( stderr, "Yield mutex grabbed in different thread !\n" );
         abort();
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index 45e22b0..6785f15 100644
--- vcl/unx/headless/svpinst.cxx
+++ vcl/unx/headless/svpinst.cxx
@@ -307,7 +307,7 @@ vos::IMutex* SvpSalInstance::GetYieldMutex()
 ULONG SvpSalInstance::ReleaseYieldMutex()
 {
 	if ( m_aYieldMutex.GetThreadId() ==
-		 NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+		 osl::Thread::getCurrentIdentifier() )
 	{
 		ULONG nCount = m_aYieldMutex.GetAcquireCount();
 		ULONG n = nCount;
@@ -466,13 +466,13 @@ SvpSalYieldMutex::SvpSalYieldMutex()
 void SvpSalYieldMutex::acquire()
 {
 	OMutex::acquire();
-	mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+	mnThreadId = osl::Thread::getCurrentIdentifier();
 	mnCount++;
 }
 
 void SvpSalYieldMutex::release()
 {
-	if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+	if ( mnThreadId == osl::Thread::getCurrentIdentifier() )
 	{
 		if ( mnCount == 1 )
 			mnThreadId = 0;
@@ -485,7 +485,7 @@ sal_Bool SvpSalYieldMutex::tryToAcquire()
 {
 	if ( OMutex::tryToAcquire() )
 	{
-		mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+		mnThreadId = osl::Thread::getCurrentIdentifier();
 		mnCount++;
 		return sal_True;
 	}
diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx
index a0ea213..202698f 100644
--- vcl/unx/headless/svpinst.hxx
+++ vcl/unx/headless/svpinst.hxx
@@ -40,7 +40,7 @@
 #include <vcl/salwtype.hxx>
 #include <vcl/saltimer.hxx>
 #include <vos/mutex.hxx>
-#include <vos/thread.hxx>
+#include <osl/thread.hxx>
 
 #include <list>
 
@@ -56,7 +56,7 @@ class SvpSalYieldMutex : public NAMESPACE_VOS(OMutex)
 {
 protected:
 	ULONG										mnCount;
-	NAMESPACE_VOS(OThread)::TThreadIdentifier	mnThreadId;
+	oslThreadIdentifier	mnThreadId;
 
 public:
 												SvpSalYieldMutex();
@@ -66,7 +66,7 @@ public:
 	virtual sal_Bool 							tryToAcquire();
 
 	ULONG										GetAcquireCount() const { return mnCount; }
-	NAMESPACE_VOS(OThread)::TThreadIdentifier	GetThreadId() const { return mnThreadId; }
+	oslThreadIdentifier	GetThreadId() const { return mnThreadId; }
 };
 
 // ---------------
diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h
index 6e43c21..323e28e 100644
--- vcl/unx/inc/salinst.h
+++ vcl/unx/inc/salinst.h
@@ -43,8 +43,8 @@
 #ifndef _VOS_MUTEX_HXX
 #include <vos/mutex.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _VCL_DLLAPI_H
 #include <vcl/dllapi.h>
@@ -58,7 +58,7 @@ class VCL_DLLPUBLIC SalYieldMutex : public NAMESPACE_VOS(OMutex)
 {
 protected:
 	ULONG										mnCount;
-	NAMESPACE_VOS(OThread)::TThreadIdentifier	mnThreadId;
+	oslThreadIdentifier	mnThreadId;
 
 public:
 												SalYieldMutex();
@@ -68,7 +68,7 @@ public:
 	virtual sal_Bool 							tryToAcquire();
 
 	ULONG										GetAcquireCount() const { return mnCount; }
-	NAMESPACE_VOS(OThread)::TThreadIdentifier	GetThreadId() const { return mnThreadId; }
+	oslThreadIdentifier	GetThreadId() const { return mnThreadId; }
 };
 
 // -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/vcl/unx/inc/salsys.h b/vcl/unx/inc/salsys.h
index 99dd686..be454dc 100644
--- vcl/unx/inc/salsys.h
+++ vcl/unx/inc/salsys.h
@@ -43,8 +43,8 @@
 #ifndef _VOS_MUTEX_HXX
 #include <vos/mutex.hxx>
 #endif
-#ifndef _VOS_THREAD_HXX
-#include <vos/thread.hxx>
+#ifndef _THREAD_HXX_
+#include <osl/thread.hxx>
 #endif
 #ifndef _SV_SALSYS_HXX
 #include <vcl/salsys.hxx>
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index b9efe40..2a43618 100644
--- vcl/unx/source/app/saldisp.cxx
+++ vcl/unx/source/app/saldisp.cxx
@@ -2360,7 +2360,7 @@ void SalX11Display::Yield()
 
     XEvent aEvent;
     DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() ==
-                NAMESPACE_VOS(OThread)::getCurrentIdentifier(),
+                osl::Thread::getCurrentIdentifier(),
                 "will crash soon since solar mutex not locked in SalDisplay::Yield" );
 
     XNextEvent( pDisp_, &aEvent );
diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx
index f3a9693..f26797a 100644
--- vcl/unx/source/app/salinst.cxx
+++ vcl/unx/source/app/salinst.cxx
@@ -94,13 +94,13 @@ SalYieldMutex::SalYieldMutex()
 void SalYieldMutex::acquire()
 {
 	OMutex::acquire();
-	mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+	mnThreadId = osl::Thread::getCurrentIdentifier();
 	mnCount++;
 }
 
 void SalYieldMutex::release()
 {
-	if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+	if ( mnThreadId == osl::Thread::getCurrentIdentifier() )
 	{
 		if ( mnCount == 1 )
 			mnThreadId = 0;
@@ -113,7 +113,7 @@ sal_Bool SalYieldMutex::tryToAcquire()
 {
 	if ( OMutex::tryToAcquire() )
 	{
-		mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier();
+		mnThreadId = osl::Thread::getCurrentIdentifier();
 		mnCount++;
 		return True;
 	}
@@ -261,7 +261,7 @@ ULONG X11SalInstance::ReleaseYieldMutex()
 {
 	SalYieldMutex* pYieldMutex = mpSalYieldMutex;
 	if ( pYieldMutex->GetThreadId() ==
-		 NAMESPACE_VOS(OThread)::getCurrentIdentifier() )
+		 osl::Thread::getCurrentIdentifier() )
 	{
 		ULONG nCount = pYieldMutex->GetAcquireCount();
 		ULONG n = nCount;
