Skip to content
Snippets Groups Projects
Commit 56e88ad2 authored by scott snyder's avatar scott snyder
Browse files

TrigPSC: Suppress thread-safety checker warning.

An uncoming change to the thread-safety checker will generate warnings
for virtual calls to unsafe functions.

This then gets a warning for the call to ITrigEventLoopMgr::prepareForRun
in Psc::prepareForRun.  Perhaps that latter function should also be marked
NOT_THREAD_SAFE, but that's awkward since the base class defining this
interface is in hltinterface.

Just suppress the warning for now.
parent b9ffea6f
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
e // 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