This class implements a mutex with FIFO scheduling policy, based on boost mutexes and semaphores.
More...
Detailed Description
This class implements a mutex with FIFO scheduling policy, based on boost mutexes and semaphores.
When the mutex is unlocked, the thread that takes the mutex is the first one that tried to lock it.
Definition at line 22 of file threads.hpp.
#include <threads.hpp>
List of all members.
Public Member Functions |
void | lock () |
bool | try_lock () |
void | unlock () |
bool | own_lock () |
Private Types |
typedef std::pair
< boost::semaphore *, bool > | SemWait |
typedef std::pair
< boost::thread::id, SemWait > | SemThread |
typedef std::map
< boost::thread::id, SemWait > | SemsMap |
typedef std::list
< SemsMap::iterator > | SemsList |
Private Member Functions |
bool | lock_ (bool try_) |
Private Attributes |
boost::mutex | m |
SemsMap | allSems |
SemsList | waitingSems |
boost::optional
< SemsMap::iterator > | computingSem |
The documentation for this class was generated from the following file: