Skip to content

Commit f989400

Browse files
rrivera747Copilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 8607a60 commit f989400

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

otsdaq/GatewaySupervisor/GatewaySupervisor.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifndef _ots_GatewaySupervisor_h
22
#define _ots_GatewaySupervisor_h
3+
#include <atomic>
34

45
#include "otsdaq/CoreSupervisors/ConfigurationSupervisorBase.h"
56
#include "otsdaq/CoreSupervisors/CorePropertySupervisorBase.h"
@@ -301,12 +302,12 @@ class WorkLoopManager;
301302
bool& getIterationsDone() { return messages_[0].iterationsDone_; }
302303

303304
// each thread accesses these members
304-
std::mutex threadMutex_;
305-
unsigned int threadIndex_;
306-
volatile bool exitThread_, working_, workToDo_, error_;
307-
volatile bool hardCancelRequested_;
308-
pthread_t pthreadId_;
309-
volatile bool hasPthreadId_;
305+
std::mutex threadMutex_;
306+
unsigned int threadIndex_;
307+
std::atomic<bool> exitThread_, working_, workToDo_, error_;
308+
std::atomic<bool> hardCancelRequested_;
309+
pthread_t pthreadId_;
310+
std::atomic<bool> hasPthreadId_;
310311
// always just 1 message (for now)
311312
std::vector<BroadcastThreadStruct::BroadcastMessageStruct> messages_;
312313

0 commit comments

Comments
 (0)