[Libreoffice-commits] core.git: slideshow/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 5 13:41:38 UTC 2021
slideshow/source/engine/eventqueue.cxx | 16 ++++++++--------
slideshow/source/inc/eventqueue.hxx | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 63773ac90ed83987063077184e48b526f70216eb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 5 13:54:17 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 5 15:40:54 2021 +0200
tdf#143728 Certain presentation crashes Impress after starting slideshow
Revert "osl::Mutex->std::mutex in EventQueue"
This reverts commit c0ce120b55ba389729e97babf80f2cb39ce38e9f.
because we try to take the same lock twice
Change-Id: Ie62659ec3407089f616d1ea950a3755300d68eef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119988
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/slideshow/source/engine/eventqueue.cxx b/slideshow/source/engine/eventqueue.cxx
index 73bf2a398e73..6094fa43bf89 100644
--- a/slideshow/source/engine/eventqueue.cxx
+++ b/slideshow/source/engine/eventqueue.cxx
@@ -77,7 +77,7 @@ namespace slideshow::internal
bool EventQueue::addEvent( const EventSharedPtr& rEvent )
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
SAL_INFO("slideshow.eventqueue", "adding event \"" << rEvent->GetDescription()
<< "\" [" << rEvent.get()
@@ -103,7 +103,7 @@ namespace slideshow::internal
bool EventQueue::addEventForNextRound( EventSharedPtr const& rEvent )
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
SAL_INFO("slideshow.eventqueue", "adding event \"" << rEvent->GetDescription()
<< "\" [" << rEvent.get()
@@ -120,7 +120,7 @@ namespace slideshow::internal
bool EventQueue::addEventWhenQueueIsEmpty (const EventSharedPtr& rpEvent)
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
SAL_INFO("slideshow.eventqueue", "adding event \"" << rpEvent->GetDescription()
<< "\" [" << rpEvent.get()
@@ -140,14 +140,14 @@ namespace slideshow::internal
void EventQueue::forceEmpty()
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
process_(true);
}
void EventQueue::process()
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
process_(false);
}
@@ -257,14 +257,14 @@ namespace slideshow::internal
bool EventQueue::isEmpty() const
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
return maEvents.empty() && maNextEvents.empty() && maNextNextEvents.empty();
}
double EventQueue::nextTimeout() const
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
// return time for next entry (if any)
double nTimeout (::std::numeric_limits<double>::max());
@@ -281,7 +281,7 @@ namespace slideshow::internal
void EventQueue::clear()
{
- std::scoped_lock aGuard( maMutex );
+ ::osl::MutexGuard aGuard( maMutex );
// TODO(P1): Maybe a plain vector and vector.swap will
// be faster here. Profile.
diff --git a/slideshow/source/inc/eventqueue.hxx b/slideshow/source/inc/eventqueue.hxx
index fb0f1b8536eb..63c93f7a302d 100644
--- a/slideshow/source/inc/eventqueue.hxx
+++ b/slideshow/source/inc/eventqueue.hxx
@@ -21,10 +21,10 @@
#define INCLUDED_SLIDESHOW_SOURCE_INC_EVENTQUEUE_HXX
#include <canvas/elapsedtime.hxx>
+#include <osl/mutex.hxx>
#include "event.hxx"
-#include <mutex>
#include <queue>
#include <vector>
@@ -116,7 +116,7 @@ namespace slideshow::internal
getTimer() const { return mpTimer; }
private:
- mutable std::mutex maMutex;
+ mutable ::osl::Mutex maMutex;
struct EventEntry
{
More information about the Libreoffice-commits
mailing list