#include <helping_lock.h>
Public Member Functions | |
Helping_lock () | |
Constructor. | |
bool | test_and_set () |
Acquire the lock with priority inheritance. | |
void | lock () |
Acquire the lock with priority inheritance. | |
bool | test () |
Is lock set?. | |
void | clear () |
Free the lock. | |
Context * | lock_owner () |
Lock owner. | |
Static Public Attributes | |
static bool | threading_system_active = false |
Threading system activated. | |
Private Attributes | |
Switch_lock | _switch_lock |
This wrapper is necessary because most lock-protected objects are initialized before the threading system has been fired up.
|
Constructor.
|
|
Free the lock. Return the CPU to helper or next lock owner, whoever has the higher priority, given that thread's priority is higher that our's. |
|
Acquire the lock with priority inheritance. If the lock is occupied, enqueue in list of helpers and lend CPU to current lock owner until we are the lock owner. |
|
Lock owner.
|
|
Is lock set?.
|
|
Acquire the lock with priority inheritance.
|
|
|
|
Threading system activated.
|