summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/app/salinst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/app/salinst.cxx')
-rw-r--r--vcl/unx/generic/app/salinst.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 3b57544ebad0..7233225f4d9b 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,7 @@
#include "vcl/helper.hxx"
#include "salwtype.hxx"
+#include <sal/macros.h>
// -------------------------------------------------------------------------
//
@@ -66,27 +68,27 @@ SalYieldMutex::SalYieldMutex()
void SalYieldMutex::acquire()
{
- OMutex::acquire();
- mnThreadId = vos::OThread::getCurrentIdentifier();
+ SolarMutexObject::acquire();
+ mnThreadId = osl::Thread::getCurrentIdentifier();
mnCount++;
}
void SalYieldMutex::release()
{
- if ( mnThreadId == vos::OThread::getCurrentIdentifier() )
+ if ( mnThreadId == osl::Thread::getCurrentIdentifier() )
{
if ( mnCount == 1 )
mnThreadId = 0;
mnCount--;
}
- OMutex::release();
+ SolarMutexObject::release();
}
sal_Bool SalYieldMutex::tryToAcquire()
{
- if ( OMutex::tryToAcquire() )
+ if ( SolarMutexObject::tryToAcquire() )
{
- mnThreadId = vos::OThread::getCurrentIdentifier();
+ mnThreadId = osl::Thread::getCurrentIdentifier();
mnCount++;
return True;
}
@@ -221,7 +223,7 @@ bool X11SalInstance::AnyInput(sal_uInt16 nType)
return bRet;
}
-vos::IMutex* X11SalInstance::GetYieldMutex()
+osl::SolarMutex* X11SalInstance::GetYieldMutex()
{
return mpSalYieldMutex;
}
@@ -232,7 +234,7 @@ sal_uLong X11SalInstance::ReleaseYieldMutex()
{
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
if ( pYieldMutex->GetThreadId() ==
- vos::OThread::getCurrentIdentifier() )
+ osl::Thread::getCurrentIdentifier() )
{
sal_uLong nCount = pYieldMutex->GetAcquireCount();
sal_uLong n = nCount;
@@ -267,8 +269,7 @@ bool X11SalInstance::CheckYieldMutex()
bool bRet = true;
SalYieldMutex* pYieldMutex = mpSalYieldMutex;
- if ( pYieldMutex->GetThreadId() !=
- vos::OThread::getCurrentIdentifier() )
+ if ( pYieldMutex->GetThreadId() != osl::Thread::getCurrentIdentifier() )
{
bRet = false;
}
@@ -319,7 +320,7 @@ static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths )
};
::std::list< ByteString > aLines;
- for( unsigned int i = 0; i < sizeof(pCommands)/sizeof(pCommands[0]); i++ )
+ for( unsigned int i = 0; i < SAL_N_ELEMENTS(pCommands); i++ )
{
FILE* pPipe = popen( pCommands[i], "r" );
aLines.clear();
@@ -450,3 +451,5 @@ void X11SalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, cons
if (add_to_recently_used_file_list)
add_to_recently_used_file_list(rFileUrl, rMimeType);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */