[Libreoffice-commits] core.git: vcl/headless

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 29 15:25:14 UTC 2019


 vcl/headless/svpinst.cxx |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 065f603379efe669d6ab496e6b8659de88949487
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Apr 27 22:23:03 2019 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Apr 29 17:24:14 2019 +0200

    unipoll: do the legacy wakeup if not in unipoll mode.
    
    Change-Id: I7f5663f3316eb2bafcf13d07e2af69ae6f0637f5
    Reviewed-on: https://gerrit.libreoffice.org/71445
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Jenkins

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index a9c3488114fc..275ffc092735 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -374,8 +374,22 @@ sal_uInt32 SvpSalYieldMutex::doRelease(bool const bUnlockAll)
         // read m_nCount before doRelease
         bool const isReleased(bUnlockAll || m_nCount == 1);
         nCount = comphelper::SolarMutex::doRelease( bUnlockAll );
-        if (isReleased && pInst)
-            pInst->Wakeup(SvpRequest::NONE);
+
+        if (isReleased)
+        {
+            ImplSVData* pSVData = ImplGetSVData();
+            if (pSVData->mpPollCallback) // is unipoll
+            {
+                if (pInst)
+                    pInst->Wakeup(SvpRequest::NONE);
+            }
+            else
+            {
+                std::unique_lock<std::mutex> g(m_WakeUpMainMutex);
+                m_wakeUpMain = true;
+                m_WakeUpMainCond.notify_one();
+            }
+        }
     }
     return nCount;
 }


More information about the Libreoffice-commits mailing list