mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
shm: add APIs for implementing keep-alive process
This commit is contained in:
committed by
Dennis Klein
parent
eb4620b1ec
commit
692576a5b1
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -44,5 +45,12 @@ uint64_t makeShmIdUint64(const std::string& sessionId)
|
||||
return id;
|
||||
}
|
||||
|
||||
std::string makeShmIdStr(uint64_t val)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << std::setfill('0') << std::setw(8) << std::hex << val;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
|
||||
} // namespace fair::mq::shmem
|
||||
|
Reference in New Issue
Block a user