vcl/source/app/watchdog.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit cea165a3ebdb5f2a2b172004ff1b3848f303d78a Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Sep 11 14:15:54 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Sep 11 16:04:17 2023 +0200 gbWatchdogFiring, replace 'volatile bool' with std::atomic<bool> this can be touched from different threads, so atomic is a better tool than volatile. Change-Id: I7304eb50cf565efc4322871e56d21eb4128c4a8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156821 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/app/watchdog.cxx b/vcl/source/app/watchdog.cxx index b14611e227ca..dc2153e63907 100644 --- a/vcl/source/app/watchdog.cxx +++ b/vcl/source/app/watchdog.cxx @@ -25,9 +25,11 @@ #include <valgrind/memcheck.h> #endif +#include <atomic> + namespace { -volatile bool gbWatchdogFiring = false; +std::atomic<bool> gbWatchdogFiring = false; osl::Condition* gpWatchdogExit = nullptr; rtl::Reference<WatchdogThread> gxWatchdog;