9 #ifndef mrpt_synch_semaphore_H
10 #define mrpt_synch_semaphore_H
45 unsigned int initialCount,
46 unsigned int maxCount,
47 const std::string &name=std::string(
"") );
57 bool waitForSignal(
unsigned int timeout_ms = 0 );
61 void release(
unsigned int increaseCount = 1);
65 inline std::string
getName()
const {
return m_name; }
68 inline bool isNamed()
const {
return !m_name.empty(); }
Represents a memory block (via "void*") that can be shared between several objects through copy opera...
std::string getName() const
Get the name of the named semaphore or an empty string if it's unnamed.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::utils::CReferencedMemBlock m_data
bool isNamed() const
Return true if this is a named semaphore.
A semaphore for inter-thread synchronization.
std::string m_name
The name of the named semaphore, or empty if unnamed.