summaryrefslogtreecommitdiff
path: root/vcl/os2
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-10-16 03:20:00 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-25 19:55:38 -0500
commitd88b292704957818eff9a348a524b5c90b40031b (patch)
treeeabf039491304b2c13f3bd77ca0b6d58c3dba1b8 /vcl/os2
parent98b2c08dff4d00b3e7a2e001c326ebe27dae4549 (diff)
merge vosremoval-mutex.diff
In practice the changeset is 'inspired' by vosremoval-mutex.diff but was essentially redone manually
Diffstat (limited to 'vcl/os2')
-rw-r--r--vcl/os2/inc/salinst.h5
-rw-r--r--vcl/os2/source/app/salinst.cxx20
2 files changed, 13 insertions, 12 deletions
diff --git a/vcl/os2/inc/salinst.h b/vcl/os2/inc/salinst.h
index 0948f605c286..ddb2050b33e3 100644
--- a/vcl/os2/inc/salinst.h
+++ b/vcl/os2/inc/salinst.h
@@ -30,6 +30,7 @@
#include <vcl/sv.h>
#include <vcl/salinst.hxx>
+#include <vcl/solarmutex.hxx>
namespace vos { class OMutex; }
@@ -52,7 +53,7 @@ public:
char** mpArgv; // commandline
HWND mhComWnd; // window, for communication (between threads and the main thread)
SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
- vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex
+ osl::Mutex* mpSalWaitMutex; // Sal-Wait-Mutex
USHORT mnYieldWaitCount; // Wait-Count
public:
@@ -82,7 +83,7 @@ public:
virtual SalI18NImeStatus* CreateI18NImeStatus();
virtual SalSystem* CreateSalSystem();
virtual SalBitmap* CreateSalBitmap();
- virtual vos::IMutex* GetYieldMutex();
+ virtual osl::SolarMutex* GetYieldMutex();
virtual ULONG ReleaseYieldMutex();
virtual void AcquireYieldMutex( ULONG nCount );
virtual void Yield( bool, bool );
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx
index e89c345edc9a..90483bdb3a9b 100644
--- a/vcl/os2/source/app/salinst.cxx
+++ b/vcl/os2/source/app/salinst.cxx
@@ -36,7 +36,7 @@
#define _SV_SALINST_CXX
-#include <vos/mutex.hxx>
+#include <vcl/solarmutex.hxx>
#include <tools/debug.hxx>
#include <salids.hrc>
@@ -82,7 +82,7 @@ MRESULT EXPENTRY SalComWndProc( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nMP2
// =======================================================================
-class SalYieldMutex : public vos::OMutex
+class SalYieldMutex : public vcl::SolarMutexObject
{
public:
Os2SalInstance* mpInstData;
@@ -112,7 +112,7 @@ SalYieldMutex::SalYieldMutex( Os2SalInstance* pInstData )
void SalYieldMutex::acquire()
{
- OMutex::acquire();
+ SolarMutexObject::acquire();
mnCount++;
mnThreadId = GetCurrentThreadId();
}
@@ -123,7 +123,7 @@ void SalYieldMutex::release()
{
ULONG nThreadId = GetCurrentThreadId();
if ( mnThreadId != nThreadId )
- OMutex::release();
+ SolarMutexObject::release();
else
{
SalData* pSalData = GetSalData();
@@ -136,13 +136,13 @@ void SalYieldMutex::release()
WinPostMsg( mpInstData->mhComWnd, SAL_MSG_RELEASEWAITYIELD, 0, 0 );
mnThreadId = 0;
mnCount--;
- OMutex::release();
+ SolarMutexObject::release();
mpInstData->mpSalWaitMutex->release();
}
else
{
mnCount--;
- OMutex::release();
+ SolarMutexObject::release();
}
}
else
@@ -150,7 +150,7 @@ void SalYieldMutex::release()
if ( mnCount == 1 )
mnThreadId = 0;
mnCount--;
- OMutex::release();
+ SolarMutexObject::release();
}
}
}
@@ -159,7 +159,7 @@ void SalYieldMutex::release()
sal_Bool SalYieldMutex::tryToAcquire()
{
- if ( OMutex::tryToAcquire() )
+ if ( SolarMutexObject::tryToAcquire() )
{
mnCount++;
mnThreadId = GetCurrentThreadId();
@@ -493,7 +493,7 @@ Os2SalInstance::Os2SalInstance()
{
mhComWnd = 0;
mpSalYieldMutex = new SalYieldMutex( this );
- mpSalWaitMutex = new vos::OMutex;
+ mpSalWaitMutex = new osl::Mutex;
mnYieldWaitCount = 0;
mpSalYieldMutex->acquire();
::tools::SolarMutex::SetSolarMutex( mpSalYieldMutex );
@@ -512,7 +512,7 @@ Os2SalInstance::~Os2SalInstance()
// -----------------------------------------------------------------------
-vos::IMutex* Os2SalInstance::GetYieldMutex()
+osl::SolarMutex* Os2SalInstance::GetYieldMutex()
{
return mpSalYieldMutex;
}