summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-11-06 11:28:52 +0100
committerAndras Timar <andras.timar@collabora.com>2018-11-06 14:31:44 +0100
commitd186ed09bcabe36f70e8a58b4f0b1c05c3c72218 (patch)
tree9dd5227bf638e2fba37d4d070160223d470f386b /vcl
parent4d9dda3fd096b9bffba5a07243a86208affd893f (diff)
replace Application::GetMainThreadIdentifier to Application::IsMainThread
Change-Id: I2b9ea77b48673af3575a3142feea5bed84f75d74 Reviewed-on: https://gerrit.libreoffice.org/62950 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/svapp.cxx4
-rw-r--r--vcl/source/helper/threadex.cxx2
-rw-r--r--vcl/unx/generic/app/saldata.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 7c1219795d6b..3221804607e3 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -518,9 +518,9 @@ comphelper::SolarMutex& Application::GetSolarMutex()
return *(pSVData->mpDefInst->GetYieldMutex());
}
-oslThreadIdentifier Application::GetMainThreadIdentifier()
+bool Application::IsMainThread()
{
- return ImplGetSVData()->mnMainThreadId;
+ return ImplGetSVData()->mnMainThreadId == osl::Thread::getCurrentIdentifier();
}
sal_uInt32 Application::ReleaseSolarMutex()
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 6e3f7f4808f8..16249bf44c9a 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -45,7 +45,7 @@ IMPL_LINK_NOARG(SolarThreadExecutor, worker, void*, void)
void SolarThreadExecutor::execute()
{
- if( ::osl::Thread::getCurrentIdentifier() == Application::GetMainThreadIdentifier() )
+ if( Application::IsMainThread() )
{
m_aStart.set();
doIt();
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 8141da534a57..decdaa50177e 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -82,7 +82,7 @@ static int XErrorHdl( Display *pDisplay, XErrorEvent *pEvent )
static int XIOErrorHdl( Display * )
{
- if (::osl::Thread::getCurrentIdentifier() == Application::GetMainThreadIdentifier())
+ if ( Application::IsMainThread() )
{
/* #106197# hack: until a real shutdown procedure exists
* _exit ASAP