Skip to content
Snippets Groups Projects
Commit 2556fcc9 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'thread.TrigPSC-20200620' into 'master'

TrigPSC: Suppress thread-safety checker warning.

See merge request atlas/athena!33992
parents 205ccde3 411ec16a
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include <boost/property_tree/xml_parser.hpp> #include <boost/property_tree/xml_parser.hpp>
#include "CxxUtils/checker_macros.h"
using namespace boost::property_tree; using namespace boost::property_tree;
namespace namespace
...@@ -523,7 +525,20 @@ bool psc::Psc::prepareForRun (const ptree& args) ...@@ -523,7 +525,20 @@ bool psc::Psc::prepareForRun (const ptree& args)
} }
// bind args to prepareForRun // bind args to prepareForRun
auto prep = [&args](ITrigEventLoopMgr* mgr){return mgr->prepareForRun(args);}; auto prep = [&args](ITrigEventLoopMgr* mgr) {
// FIXME: ITrigEventLookMgr::prepareForRun is declared NOT_THREAD_SAFE.
// Probably this method shoud also be NOT_THREAD_SAFE, but that's
// awkward because it implements a tdaq interface from hltinterface.
StatusCode ret ATLAS_THREAD_SAFE = mgr->prepareForRun (args);
// This dance is needed to prevent RV optimization.
// Otherwise, the optimizer loses the ATLAS_THREAD_SAFE attribute
// on RET before the thread-safety checker gets to see the code.
if (ret.isSuccess()) {
return StatusCode (StatusCode::SUCCESS);
}
return ret;
};
if(!callOnEventLoopMgr<ITrigEventLoopMgr>(prep, "prepareForRun").isSuccess()) if(!callOnEventLoopMgr<ITrigEventLoopMgr>(prep, "prepareForRun").isSuccess())
{ {
ERS_PSC_ERROR("Error preparing the EventLoopMgr"); ERS_PSC_ERROR("Error preparing the EventLoopMgr");
......
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