diff options
Diffstat (limited to 'vcl/os2/source/app')
-rw-r--r-- | vcl/os2/source/app/salinst.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx index 44b87dc2a57b..e4fd783ccb27 100644 --- a/vcl/os2/source/app/salinst.cxx +++ b/vcl/os2/source/app/salinst.cxx @@ -40,7 +40,7 @@ #include <tools/debug.hxx> #include <salids.hrc> -#include <vcl/salatype.hxx> +#include <vcl/apptypes.hxx> #include <saldata.hxx> #include <salinst.h> #include <salframe.h> @@ -295,10 +295,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 ) @@ -308,7 +307,7 @@ void ImplDbgTestSolarMutex() SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; if ( pYieldMutex->mnThreadId != nCurThreadId ) { - OSL_FAIL( "SolarMutex not locked, and not thread save code in VCL is called from outside of the main thread" ); + bRet = false; } } } @@ -319,14 +318,13 @@ void ImplDbgTestSolarMutex() SalYieldMutex* pYieldMutex = pSalData->mpFirstInstance->mpSalYieldMutex; if ( pYieldMutex->mnThreadId != nCurThreadId ) { - OSL_FAIL( "SolarMutex not locked in the main thread" ); + bRet = false; } } } + return bRet; } -#endif - // ======================================================================= void InitSalData() |