4 #ifndef __KERNEL_MUTEX_H__
5 #define __KERNEL_MUTEX_H__
25 void __mutex_init(
struct mutex *mtx);
26 void thread_inherit_priority(
struct mutex *
mutex);
27 void thread_reset_inherited_priority(
struct mutex *
mutex);
int mutex_trylock(struct mutex *mtx)
Lock the mutex. If the mutex is currently locked then the function shall return immediately.
Definition: mutex.c:36
void mutex_init(struct mutex *mtx)
Initialize the mutex.
Definition: mutex.c:21
int mutex_lock(struct mutex *mtx)
Lock the mutex.
Definition: mutex.c:59
int mutex_unlock(struct mutex *mtx)
Unlock the mutex.
Definition: mutex.c:84
bool mutex_is_locked(struct mutex *mtx)
Check if the mutex is locked or not.
Definition: mutex.c:27