Data Structures | |
class | Mutex |
The Mutex class is used to synchronize the execution of threads. More... | |
Functions | |
Mutex () | |
Create and Initialize a Mutex object. More... | |
Mutex (const char *name) | |
Create and Initialize a Mutex object. More... | |
~Mutex () | |
Mutex destructor. More... | |
void | lock () |
Wait until a Mutex becomes available. More... | |
bool | trylock () |
Try to lock the mutex, and return immediately. More... | |
bool | trylock_for (uint32_t millisec) |
Try to lock the mutex for a specified time. More... | |
bool | trylock_for (Kernel::Clock::duration_u32 rel_time) |
Try to lock the mutex for a specified time. More... | |
bool | trylock_until (uint64_t millisec) |
Try to lock the mutex until specified time. More... | |
bool | trylock_until (Kernel::Clock::time_point abs_time) |
Try to lock the mutex until specified time. More... | |
void | unlock () |
Unlock the mutex that has previously been locked by the same thread. More... | |
void lock | ( | void | ) |
Mutex | ( | ) |
Mutex | ( | const char * | name | ) |
bool trylock | ( | ) |
bool trylock_for | ( | uint32_t | millisec | ) |
Try to lock the mutex for a specified time.
millisec | timeout value. |
5s
rather than 5000
. bool trylock_for | ( | Kernel::Clock::duration_u32 | rel_time | ) |
Try to lock the mutex for a specified time.
rel_time | timeout value. |
bool trylock_until | ( | uint64_t | millisec | ) |
Try to lock the mutex until specified time.
millisec | absolute timeout time, referenced to Kernel::get_ms_count() |
Kernel::Clock::now() + 5s
rather than Kernel::get_ms_count() + 5000
. bool trylock_until | ( | Kernel::Clock::time_point | abs_time | ) |
Try to lock the mutex until specified time.
abs_time | absolute timeout time, referenced to Kernel::Clock |
void unlock | ( | void | ) |