 |
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "boost/dynamic_bitset.hpp"
32 bool endGrace (
const EventContext& ctx,
33 boost::dynamic_bitset<>& grace)
35 EventContext::ContextID_t slot = ctx.slot();
36 if (slot == EventContext::INVALID_CONTEXT_ID)
return false;
37 if (slot >= grace.size()) std::abort();
115 : m_svc (
other.m_svc),
116 m_graceSets (std::move (
other.m_graceSets)),
117 m_nold (
other.m_nold),
124 other.m_dirty =
false;
129 other.m_svc =
nullptr;
195 if (garbageSize &&
m_nold == 0) {
void quiescentOol(const EventContext &ctx)
Out-of-line part of quiescent().
boost::dynamic_bitset m_oldGrace
Same thing, for the objects marked as old.
std::atomic< bool > m_dirty
True if there are any objects pending deletion.
read-copy-update (RCU) style synchronization for Athena.
IRCUObject(IRCUSvc &svc)
Constructor, with RCUSvc.
IRCUSvc * m_svc
The service with which we're registered, or null.
virtual bool clearOld(lock_t &, size_t nold)=0
Delete old objects.
virtual void add(IRCUObject *obj)=0
Add a new RCU object to the set being managed.
virtual ~IRCUObject()
Destructor.
RCUObjectGraceSets(size_t nslots)
size_t m_nold
Number of old objects.
boost::dynamic_bitset m_grace
Bit[i] set means that slot i is in a grace period.
read-copy-update (RCU) style synchronization for Athena.
Some weak symbol referencing magic...
void makeOld(lock_t &lock, size_t garbageSize)
Make existing pending objects old, if possible.
Interface for RCU service.
std::mutex m_mutex
The mutex for this object.
std::unique_lock< mutex_t > lock_t
AthROOTErrorHandlerSvc * svc
virtual StatusCode remove(IRCUObject *obj)=0
Remove an object from the service.
void setGrace(lock_t &)
Declare that all slots are in a grace period.
Base object class for RCU-style synchronization for Athena.
virtual void clearAll(lock_t &)=0
Delete all objects.
bool endGrace(lock_t &lock, const EventContext &ctx)
Declare that the grace period for a slot is ending.
std::unique_ptr< RCUObjectGraceSets > m_graceSets
Holds the current and old grace period bitmasks.