1 #ifndef FWCore_SharedMemory_ControllerChannel_h 2 #define FWCore_SharedMemory_ControllerChannel_h 24 #include "boost/interprocess/managed_shared_memory.hpp" 25 #include "boost/interprocess/sync/named_mutex.hpp" 26 #include "boost/interprocess/sync/named_condition.hpp" 27 #include "boost/interprocess/sync/scoped_lock.hpp" 60 using namespace boost::posix_time;
63 if (not
cndToMain_.timed_wait(lock, microsec_clock::universal_time() +
seconds(60))) {
78 if (not
wait(lock, iTrans, iTransitionID)) {
112 bool wait(boost::interprocess::scoped_lock<boost::interprocess::named_mutex>&
lock,
114 unsigned long long iTransID);
BufferInfo * toWorkerBufferInfo()
This can be used with WriteBuffer to keep Controller and Worker in sync.
boost::interprocess::named_condition cndToMain_
BufferInfo * fromWorkerBufferInfo_
ControllerChannel(std::string const &iName, int iID)
edm::Transition * transitionType_
BufferInfo * fromWorkerBufferInfo()
This can be used with ReadBuffer to keep Controller and Worker in sync.
unsigned long long * transitionID_
boost::interprocess::named_mutex mutex_
bool wait(boost::interprocess::scoped_lock< boost::interprocess::named_mutex > &lock, edm::Transition iTrans, unsigned long long iTransID)
std::string const & sharedMemoryName() const
uint16_t mem[nChs][nEvts]
const ControllerChannel & operator=(const ControllerChannel &)=delete
BufferInfo * toWorkerBufferInfo_
boost::interprocess::named_condition cndFromMain_
boost::interprocess::managed_shared_memory managed_sm_
std::string uniqueName(std::string iBase) const
static BufferInfo * bufferInfo(const char *iWhich, boost::interprocess::managed_shared_memory &mem)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
std::string uniqueID() const
bool doTransition(F &&iF, edm::Transition iTrans, unsigned long long iTransitionID)
bool shouldKeepEvent() const