summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-09-30 15:46:24 +0100
committerMichael Meeks <michael.meeks@suse.com>2011-10-25 13:41:50 +0100
commit6297a9c4a117fcfd01ed99a54efba7e130805598 (patch)
tree962b2526d955654a7f5fe8f7f9e5d900e89109a0 /vcl/unx
parentef93683de1b1d1dbcd7e76df5033c4d117198667 (diff)
generic: share sal yield mutex properly
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx52
1 files changed, 0 insertions, 52 deletions
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 223dc424ce7c..301e6f029bea 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -443,59 +443,7 @@ SalBitmap* GtkInstance::CreateSalBitmap()
SalTimer* GtkInstance::CreateSalTimer()
{
-#if GTK_CHECK_VERSION(3,0,0)
return new GtkSalTimer();
-#else
- return X11SalInstance::CreateSalTimer();
-#endif
-}
-
-// FIXME: these should all be in a more generic, shared base of unix's salinst.cxx
-
-osl::SolarMutex* GtkInstance::GetYieldMutex()
-{
- return mpSalYieldMutex;
-}
-
-sal_uIntPtr GtkInstance::ReleaseYieldMutex()
-{
- SalYieldMutex* pYieldMutex = mpSalYieldMutex;
- if ( pYieldMutex->GetThreadId() ==
- osl::Thread::getCurrentIdentifier() )
- {
- sal_uLong nCount = pYieldMutex->GetAcquireCount();
- sal_uLong n = nCount;
- while ( n )
- {
- pYieldMutex->release();
- n--;
- }
-
- return nCount;
- }
- else
- return 0;
-}
-
-void GtkInstance::AcquireYieldMutex( sal_uIntPtr nCount )
-{
- SalYieldMutex* pYieldMutex = mpSalYieldMutex;
- while ( nCount )
- {
- pYieldMutex->acquire();
- nCount--;
- }
-}
-
-bool GtkInstance::CheckYieldMutex()
-{
- bool bRet = true;
-
- SalYieldMutex* pYieldMutex = mpSalYieldMutex;
- if ( pYieldMutex->GetThreadId() != osl::Thread::getCurrentIdentifier() )
- bRet = false;
-
- return bRet;
}
void GtkInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )