summaryrefslogtreecommitdiff
path: root/vcl/os2/source/app/salinst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/os2/source/app/salinst.cxx')
-rw-r--r--vcl/os2/source/app/salinst.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx
index b08a9769ccf4..df564f36ee0a 100644
--- a/vcl/os2/source/app/salinst.cxx
+++ b/vcl/os2/source/app/salinst.cxx
@@ -298,10 +298,9 @@ void ImplSalAcquireYieldMutex( ULONG nCount )
// -----------------------------------------------------------------------
-#ifdef DBG_UTIL
-
-void ImplDbgTestSolarMutex()
+bool Os2SalInstance::CheckYieldMutex()
{
+ bool bRet = true;
SalData* pSalData = GetSalData();
ULONG nCurThreadId = GetCurrentThreadId();
if ( pSalData->mnAppThreadId != nCurThreadId )
@@ -311,7 +310,7 @@ void ImplDbgTestSolarMutex()
SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
if ( pYieldMutex->mnThreadId != nCurThreadId )
{
- DBG_ERROR( "SolarMutex not locked, and not thread save code in VCL is called from outside of the main thread" );
+ bRet = false;
}
}
}
@@ -322,14 +321,13 @@ void ImplDbgTestSolarMutex()
SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex;
if ( pYieldMutex->mnThreadId != nCurThreadId )
{
- DBG_ERROR( "SolarMutex not locked in the main thread" );
+ bRet = false;
}
}
}
+ return bRet;
}
-#endif
-
// =======================================================================
void InitSalData()