LF OS
Hobby operating system for amd64 with high ambitions
|
Go to the source code of this file.
Typedefs | |
typedef uint64_t | mutex_t |
Functions | |
void | init_mutex (void) |
mutex_t | mutex_create (void) |
void | mutex_destroy (mutex_t mutex) |
bool | mutex_lock (mutex_t mutex, pid_t holder) |
bool | mutex_unlock (mutex_t mutex, pid_t holder) |
void | mutex_unlock_holder (pid_t holder) |
void init_mutex | ( | void | ) |
Definition at line 20 of file mutex.c.
References kernel_alloc, mutexes, and tpa_new().
mutex_t mutex_create | ( | void | ) |
Definition at line 24 of file mutex.c.
References mutexes, next_mutex, panic_message(), mutex_data::state, and tpa_set().
void mutex_destroy | ( | mutex_t | mutex | ) |
Definition at line 38 of file mutex.c.
References logw, mutex, mutexes, panic_message(), mutex_data::state, tpa_get(), and tpa_set().
Definition at line 52 of file mutex.c.
References mutex_data::holder, mutex, mutexes, panic_message(), mutex_data::state, and tpa_get().
Definition at line 68 of file mutex.c.
References mutex_data::holder, logw, mutex, wait_data::mutex, mutexes, panic_message(), scheduler_waitable_done(), mutex_data::state, tpa_get(), and wait_reason_mutex.
void mutex_unlock_holder | ( | pid_t | holder | ) |
Definition at line 95 of file mutex.c.
References mutex_data::holder, logd, logw, mutex, mutex_unlock(), mutexes, pid, mutex_data::state, tpa_get(), and tpa_next().