Go to the source code of this file.
◆ MTX_STATUS_LOCKED
#define MTX_STATUS_LOCKED 1 |
◆ MTX_STATUS_UNLOCKED
#define MTX_STATUS_UNLOCKED 0 |
◆ Mutex
◆ Mutex_Destroy()
void Mutex_Destroy |
( |
Mutex * |
mtx | ) |
|
Definition at line 39 of file mutex.c.
40{
43 return;
44}
void Spinlock_Destroy(Spinlock *lock)
void WaitChannel_Destroy(WaitChannel *wc)
◆ Mutex_Init()
void Mutex_Init |
( |
Mutex * |
mtx, |
|
|
const char * |
name |
|
) |
| |
Definition at line 30 of file mutex.c.
31{
34
35 return;
36}
#define SPINLOCK_TYPE_NORMAL
void Spinlock_Init(Spinlock *lock, const char *name, uint64_t type)
void WaitChannel_Init(WaitChannel *wc, const char *name)
◆ Mutex_Lock()
void Mutex_Lock |
( |
Mutex * |
mtx | ) |
|
Mutex_Lock –
Acquires the mutex.
Definition at line 52 of file mutex.c.
53{
54
55
56
57
59
60
61}
uint32_t Critical_Level()
◆ Mutex_TryLock()
int Mutex_TryLock |
( |
Mutex * |
mtx | ) |
|
Mutex_TryLock –
Attempts to acquire the user mutex. Returns EBUSY if the lock is already taken, otherwise 0 on success.
Definition at line 70 of file mutex.c.
71{
72
73
74 return 0;
75}
◆ Mutex_Unlock()
void Mutex_Unlock |
( |
Mutex * |
mtx | ) |
|
Mutex_Unlock –
Releases the user mutex.
Definition at line 83 of file mutex.c.