diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-16 03:20:00 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:38 -0500 |
commit | d88b292704957818eff9a348a524b5c90b40031b (patch) | |
tree | eabf039491304b2c13f3bd77ca0b6d58c3dba1b8 /tools/source | |
parent | 98b2c08dff4d00b3e7a2e001c326ebe27dae4549 (diff) |
merge vosremoval-mutex.diff
In practice the changeset is 'inspired' by vosremoval-mutex.diff
but was essentially redone manually
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/fsys/dirent.cxx | 12 | ||||
-rw-r--r-- | tools/source/fsys/os2.cxx | 2 | ||||
-rw-r--r-- | tools/source/misc/solarmutex.cxx | 6 | ||||
-rw-r--r-- | tools/source/rc/resmgr.cxx | 6 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 8 |
5 files changed, 17 insertions, 17 deletions
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index 6342f9bcb6aa..ec167bacc846 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -58,7 +58,7 @@ #endif #include <tools/stream.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <osl/file.hxx> #include <rtl/instance.hxx> @@ -135,13 +135,13 @@ BOOL bInRedirection = TRUE; #else BOOL bInRedirection = FALSE; #endif -static NAMESPACE_VOS( OMutex )* pRedirectMutex = 0; +static osl::Mutex* pRedirectMutex = 0; //------------------------------------------------------------------------ void FSysRedirector::Register( FSysRedirector *pRedirector ) { if ( pRedirector ) - pRedirectMutex = new NAMESPACE_VOS( OMutex ); + pRedirectMutex = new osl::Mutex; else DELETEZ( pRedirectMutex ); _pRedirector = pRedirector; @@ -164,7 +164,7 @@ void FSysRedirector::DoRedirect( String &rPath ) // Redirection is acessible only by one thread per time // dont move the guard behind the bInRedirection check!!! // think of nested calls (when called from callback) - NAMESPACE_VOS( OGuard ) aGuard( pRedirectMutex ); + osl::MutexGuard aGuard( pRedirectMutex ); // if already in redirection, dont redirect if ( bInRedirection ) @@ -1039,8 +1039,8 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize ) BOOL DirEntry::Exists( FSysAccess nAccess ) const { #ifndef BOOTSTRAP - static NAMESPACE_VOS(OMutex) aLocalMutex; - NAMESPACE_VOS(OGuard) aGuard( aLocalMutex ); + static osl::Mutex aLocalMutex; + osl::MutexGuard aGuard( aLocalMutex ); #endif if ( !IsValid() ) return FALSE; diff --git a/tools/source/fsys/os2.cxx b/tools/source/fsys/os2.cxx index 3cc3918fe5a6..c552720fb2c8 100644 --- a/tools/source/fsys/os2.cxx +++ b/tools/source/fsys/os2.cxx @@ -42,7 +42,7 @@ #include "comdep.hxx" #ifdef OS2 -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #endif int Sys2SolarError_Impl( int nSysErr ); diff --git a/tools/source/misc/solarmutex.cxx b/tools/source/misc/solarmutex.cxx index 89abad90e025..8bede4e6869a 100644 --- a/tools/source/misc/solarmutex.cxx +++ b/tools/source/misc/solarmutex.cxx @@ -32,14 +32,14 @@ namespace tools { - static ::vos::IMutex* pSolarMutex = 0; + static ::osl::SolarMutex* pSolarMutex = 0; - ::vos::IMutex* SolarMutex::GetSolarMutex() + ::osl::SolarMutex* SolarMutex::GetSolarMutex() { return pSolarMutex; } - void SolarMutex::SetSolarMutex( ::vos::IMutex* pMutex ) + void SolarMutex::SetSolarMutex( ::osl::SolarMutex* pMutex ) { pSolarMutex = pMutex; } diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 110b62aaf4ed..29c6f9411786 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -1919,7 +1919,7 @@ SimpleResMgr* SimpleResMgr::Create( const sal_Char* pPrefixName, com::sun::star: // ----------------------------------------------------------------------- bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourceId ) { - NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety); + osl::MutexGuard aGuard(m_aAccessSafety); if ( ( RSC_STRING != _resourceType ) && ( RSC_RESOURCE != _resourceType ) ) return false; @@ -1931,7 +1931,7 @@ bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourc // ----------------------------------------------------------------------- UniString SimpleResMgr::ReadString( sal_uInt32 nId ) { - NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety); + osl::MutexGuard aGuard(m_aAccessSafety); DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadString : have no impl class !" ); // perhaps constructed with an invalid filename ? @@ -2002,7 +2002,7 @@ const ::com::sun::star::lang::Locale& SimpleResMgr::GetLocale() const sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer ) { - NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety); + osl::MutexGuard aGuard(m_aAccessSafety); DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadBlob : have no impl class !" ); diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 1736adf6f28a..5734cad12c35 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -41,7 +41,7 @@ #include <tools/fsys.hxx> #include <tools/stream.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <osl/thread.h> // osl_getThreadTextEncoding // class FileBase @@ -61,7 +61,7 @@ DECLARE_LIST( InternalStreamLockList, InternalStreamLock* ) namespace { struct LockList : public rtl::Static< InternalStreamLockList, LockList > {}; } #ifndef BOOTSTRAP -namespace { struct LockMutex : public rtl::Static< NAMESPACE_VOS(OMutex), LockMutex > {}; } +namespace { struct LockMutex : public rtl::Static< osl::Mutex, LockMutex > {}; } #endif class InternalStreamLock @@ -112,7 +112,7 @@ InternalStreamLock::~InternalStreamLock() sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream ) { #ifndef BOOTSTRAP - NAMESPACE_VOS( OGuard ) aGuard( LockMutex::get() ); + osl::MutexGuard aGuard( LockMutex::get() ); #endif ByteString aFileName(pStream->GetFileName(), osl_getThreadTextEncoding()); struct stat aStat; @@ -162,7 +162,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream ) { #ifndef BOOTSTRAP - NAMESPACE_VOS( OGuard ) aGuard( LockMutex::get() ); + osl::MutexGuard aGuard( LockMutex::get() ); #endif InternalStreamLock* pLock = NULL; InternalStreamLockList &rLockList = LockList::get(); |