Skip to content
Snippets Groups Projects
Commit 1c3fde0a authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'atomic1.LWHists-20221202' into 'master'

LWHists: Make some flag variables atomic.

See merge request atlas/athena!58958
parents 98d77cb5 aec1cd40
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
......@@ -14,15 +14,16 @@
#include "LWHists/LWHistControls.h"
#include "LWPools.h"
#include <atomic>
//____________________________________________________________________
class LWHistControls::Imp {
public:
static bool s_cleanupOnGetROOT;
static bool s_rootBackend;
static std::atomic<bool> s_cleanupOnGetROOT;
static std::atomic<bool> s_rootBackend;
};
bool LWHistControls::Imp::s_cleanupOnGetROOT = true;
bool LWHistControls::Imp::s_rootBackend = false;
std::atomic<bool> LWHistControls::Imp::s_cleanupOnGetROOT = true;
std::atomic<bool> LWHistControls::Imp::s_rootBackend = false;
//____________________________________________________________________
void LWHistControls::setCleanupOnGetROOT(bool b)
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
......@@ -16,7 +16,7 @@
//____________________________________________________________________
LWPools::PoolList LWPools::s_pools;
long long LWPools::s_bytesDynAlloc = 0;
std::atomic<long long> LWPools::s_bytesDynAlloc = 0;
//____________________________________________________________________
LWPools::PoolList::PoolList()
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
......@@ -20,6 +20,7 @@
#include "LWPoolSelector.h"
#include "LWPool.h"
#include <cassert>
#include <atomic>
#define MP_NEW(Class) new(LWPools::acquire(sizeof(Class))) Class
#define MP_DELETE(Ptr) LWPools::deleteObject(Ptr)
......@@ -54,7 +55,7 @@ private:
private:
class PoolList;
static PoolList s_pools;
static long long s_bytesDynAlloc;
static std::atomic<long long> s_bytesDynAlloc;
static LWPool * initPool(unsigned poolIndex,unsigned length);
static LWPool * getPool(unsigned length);
LWPools( const LWPools & );
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#include <atomic>
std::atomic<bool> cfg_report_NaN;
std::atomic<bool> cfg_ignore_unsupported_style_vars;
std::atomic<bool> cfg_ignore_errors_related_to_a_non_existant_sumw2_array;
bool cfg_report_NaN;
bool cfg_ignore_unsupported_style_vars;
bool cfg_ignore_errors_related_to_a_non_existant_sumw2_array;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment