summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-16 13:05:40 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-16 12:14:30 +0000
commit81ed73d0867e0322b450314c474fd01404671f0e (patch)
treeae675940703050612f835cd8e9d13dbee876c3fb /vcl/inc
parent0cfaabfc9457d15c819811a10deaf00eaef0e260 (diff)
tdf#100412: Cope with recursive gdk_threads_enter/_leave
07157e644fa9666850767ff6bd54c1511167a0a2 "Keep track of ThreadsEnter/Leave acquire counts per thread" was done under the assumption that these calls never happen recursively, but tdf#100412 makes it look like such calls do happen, so that in a pattern gdk_threads_enter gdk_threads_enter gdk_threads_leave gdk_threads_leave the second gdk_threads_leave could find yieldCount non-zero. Change-Id: If9837764d22473f21cf5b10d769929f3c86a0ba7 (cherry picked from commit ef1dc167cd3339b1e92d8e18b1f5c3c2cfbec6ab) Reviewed-on: https://gerrit.libreoffice.org/26365 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 86002fa7bf25..6212d5dcccba 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
#define INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
+#include <sal/config.h>
+
+#include <stack>
+
#include <unx/salinst.h>
#include <unx/gensys.h>
#include <headless/svpinst.hxx>
@@ -42,7 +46,7 @@ class GtkPrintWrapper;
class GenPspGraphics;
class GtkYieldMutex : public SalYieldMutex
{
- thread_local static sal_uIntPtr yieldCount;
+ thread_local static std::stack<sal_uIntPtr> yieldCounts;
public:
GtkYieldMutex() {}