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_until (uint64_t millisec) |
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 | ) |
Wait until a Mutex becomes available.
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. |
bool trylock_until | ( | uint64_t | millisec | ) |
Try to lock the mutex until specified time.
millisec | absolute timeout time, referenced to Kernel::get_ms_count() |
void unlock | ( | void | ) |
Unlock the mutex that has previously been locked by the same thread.