diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-16 03:15:49 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-25 19:55:29 -0500 |
commit | 46308b84ddc46d8f99e6b3416636e6286d23d7e3 (patch) | |
tree | 97d55ea961f775677ed95cb94be5aadbc9bcc680 /automation/source | |
parent | d3d553e1ef00b1ae5ac4d65e53e8ea08b24085f3 (diff) |
merge vosremoval-mutex.diff
In practice the changeset is 'inspired' by vosremoval-mutex.diff
but was essentially redone manually
Diffstat (limited to 'automation/source')
-rw-r--r-- | automation/source/communi/communi.cxx | 30 | ||||
-rw-r--r-- | automation/source/simplecm/tcpio.cxx | 8 | ||||
-rw-r--r-- | automation/source/simplecm/tcpio.hxx | 6 |
3 files changed, 22 insertions, 22 deletions
diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index 7c32484d4807..f19b095449ff 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -67,7 +67,7 @@ _SV_SEEK_PTR( nm, AE ) SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* ); -NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest +osl::Mutex *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, osl::StreamSocket* pSocket ) : SimpleCommunicationLinkViaSocket( pMan, pSocket ) @@ -78,7 +78,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM { SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl )); if ( !pMPostUserEvent ) - pMPostUserEvent = new NAMESPACE_VOS(OMutex); + pMPostUserEvent = new osl::Mutex; // this is necassary to prevent the running thread from sending the close event // before the open event has been sent. StartCallback(); @@ -93,7 +93,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() while ( nConnectionClosedEventId || nDataReceivedEventId ) GetpApp()->Yield(); { - NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed ); + osl::MutexGuard aGuard( aMConnectionClosed ); if ( nConnectionClosedEventId ) { GetpApp()->RemoveUserEvent( nConnectionClosedEventId ); @@ -104,7 +104,7 @@ CommunicationLinkViaSocket::~CommunicationLinkViaSocket() } } { - NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); + osl::MutexGuard aGuard( aMDataReceived ); if ( nDataReceivedEventId ) { GetpApp()->RemoveUserEvent( nDataReceivedEventId ); @@ -210,8 +210,8 @@ void CommunicationLinkViaSocket::run() SetNewPacketAsCurrent(); StartCallback(); { - NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); - NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); + osl::MutexGuard aGuard( aMDataReceived ); + osl::MutexGuard aGuard2( *pMPostUserEvent ); mlPutDataReceived.Call(this); } } @@ -221,8 +221,8 @@ void CommunicationLinkViaSocket::run() StartCallback(); { - NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed ); - NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); + osl::MutexGuard aGuard( aMConnectionClosed ); + osl::MutexGuard aGuard2( *pMPostUserEvent ); nConnectionClosedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, ConnectionClosed ) ); } } @@ -239,7 +239,7 @@ BOOL CommunicationLinkViaSocket::DoTransferDataStream( SvStream *pDataStream, CM long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) { { - NAMESPACE_VOS(OGuard) aGuard( aMConnectionClosed ); + osl::MutexGuard aGuard( aMConnectionClosed ); nConnectionClosedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden. } ShutdownCommunication(); @@ -250,7 +250,7 @@ long CommunicationLinkViaSocket::ConnectionClosed( void* EMPTYARG ) long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG ) { { - NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); + osl::MutexGuard aGuard( aMDataReceived ); nDataReceivedEventId = 0; // Achtung!! alles andere mu� oben gemacht werden. } return CommunicationLink::DataReceived( ); @@ -454,7 +454,7 @@ CommunicationManagerServerAcceptThread::CommunicationManagerServerAcceptThread( , xmNewConnection( NULL ) { if ( !pMPostUserEvent ) - pMPostUserEvent = new NAMESPACE_VOS(OMutex); + pMPostUserEvent = new osl::Mutex; create(); } @@ -481,7 +481,7 @@ CommunicationManagerServerAcceptThread::~CommunicationManagerServerAcceptThread( DEBUGPRINTF ("Destructor CommunicationManagerServerAcceptThread �bersprungen!!!! (wegen Solaris BUG)\n"); #endif { - NAMESPACE_VOS(OGuard) aGuard( aMAddConnection ); + osl::MutexGuard aGuard( aMAddConnection ); if ( nAddConnectionEventId ) { GetpApp()->RemoveUserEvent( nAddConnectionEventId ); @@ -532,8 +532,8 @@ void CommunicationManagerServerAcceptThread::run() xmNewConnection = new CommunicationLinkViaSocket( pMyServer, pStreamSocket ); xmNewConnection->StartCallback(); { - NAMESPACE_VOS(OGuard) aGuard( aMAddConnection ); - NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); + osl::MutexGuard aGuard( aMAddConnection ); + osl::MutexGuard aGuard2( *pMPostUserEvent ); nAddConnectionEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationManagerServerAcceptThread, AddConnection ) ); } } @@ -559,7 +559,7 @@ void CommunicationManagerServerAcceptThread::run() IMPL_LINK( CommunicationManagerServerAcceptThread, AddConnection, void*, EMPTYARG ) { { - NAMESPACE_VOS(OGuard) aGuard( aMAddConnection ); + osl::MutexGuard aGuard( aMAddConnection ); nAddConnectionEventId = 0; } pMyServer->AddConnection( xmNewConnection ); diff --git a/automation/source/simplecm/tcpio.cxx b/automation/source/simplecm/tcpio.cxx index 2906c04d2de0..e71afb399b84 100644 --- a/automation/source/simplecm/tcpio.cxx +++ b/automation/source/simplecm/tcpio.cxx @@ -34,7 +34,7 @@ /// implement ITransmiter comm_USHORT TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) { - vos::OGuard aGuard( aMSocketWriteAccess ); + osl::MutexGuard aGuard( aMSocketWriteAccess ); if ( !pStreamSocket ) { nLastSent = 0; @@ -50,7 +50,7 @@ comm_USHORT TCPIO::TransferBytes( const void* pBuffer, comm_UINT32 nLen ) /// implement IReceiver comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) { - vos::OGuard aGuard( aMSocketReadAccess ); + osl::MutexGuard aGuard( aMSocketReadAccess ); if ( !pStreamSocket ) { nLastReceived = 0; @@ -66,8 +66,8 @@ comm_USHORT TCPIO::ReceiveBytes( void* pBuffer, comm_UINT32 nLen ) // helper void TCPIO::SetStreamSocket( osl::StreamSocket* pSocket ) { - vos::OGuard aRGuard( aMSocketReadAccess ); - vos::OGuard aWGuard( aMSocketWriteAccess ); + osl::MutexGuard aRGuard( aMSocketReadAccess ); + osl::MutexGuard aWGuard( aMSocketWriteAccess ); pStreamSocket = pSocket; } diff --git a/automation/source/simplecm/tcpio.hxx b/automation/source/simplecm/tcpio.hxx index c5a3e5cd77d6..1aa49bc93f34 100644 --- a/automation/source/simplecm/tcpio.hxx +++ b/automation/source/simplecm/tcpio.hxx @@ -29,7 +29,7 @@ #define TCPIO_HXX #include <osl/socket.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include "communiio.hxx" @@ -37,8 +37,8 @@ class TCPIO : public ITransmiter, public IReceiver { private: osl::StreamSocket* pStreamSocket; - vos::OMutex aMSocketReadAccess; - vos::OMutex aMSocketWriteAccess; + osl::Mutex aMSocketReadAccess; + osl::Mutex aMSocketWriteAccess; public: |