mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-11 15:20:01 +02:00
Dev/rm volatile (#1007)
* Removing volatile and replacing with atomic to ensure atomicity * compiling header include issue
This commit is contained in:
parent
37e65634d4
commit
60868ae74e
@ -434,7 +434,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
/** data streaming (down stream) enabled in client (zmq sckets created) */
|
||||
bool client_downstream{false};
|
||||
std::vector<std::unique_ptr<ZmqSocket>> zmqSocket;
|
||||
volatile int numZmqRunning{0};
|
||||
std::atomic<int> numZmqRunning{0};
|
||||
|
||||
/** mutex to synchronize main and data processing threads */
|
||||
mutable std::mutex mp;
|
||||
|
@ -13,9 +13,10 @@
|
||||
|
||||
#include "sls/logger.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#include "sls/CircularFifo.h"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
namespace sls {
|
||||
|
||||
class Fifo : private virtual slsDetectorDefs {
|
||||
@ -49,8 +50,8 @@ class Fifo : private virtual slsDetectorDefs {
|
||||
CircularFifo<char> *fifoFree;
|
||||
CircularFifo<char> *fifoStream;
|
||||
int fifoDepth;
|
||||
volatile int status_fifoBound;
|
||||
volatile int status_fifoFree;
|
||||
std::atomic<int> status_fifoBound;
|
||||
std::atomic<int> status_fifoFree;
|
||||
};
|
||||
|
||||
} // namespace sls
|
||||
|
Loading…
x
Reference in New Issue
Block a user