|
PatchworkOS
2ca1c69
A non-POSIX operating system.
|
#include <modules/acpi/aml/runtime/mutex.h>#include <kernel/log/log.h>#include <kernel/sched/sched.h>#include <kernel/sched/thread.h>#include <errno.h>#include <stdlib.h>Go to the source code of this file.
Data Structures | |
| struct | aml_mutex_entry_t |
Functions | |
| static uint64_t | aml_mutex_stack_push (aml_mutex_id_t id, aml_sync_level_t syncLevel) |
| static uint64_t | aml_mutex_stack_pop (aml_mutex_id_t id) |
| void | aml_mutex_id_init (aml_mutex_id_t *mutex) |
| Create a new mutex and return its id. | |
| void | aml_mutex_id_deinit (aml_mutex_id_t *mutex) |
| Destroy the mutex with the given id. | |
| uint64_t | aml_mutex_acquire (aml_mutex_id_t *mutex, aml_sync_level_t syncLevel, clock_t timeout) |
| Acquire a mutex, blocking until it is available or the timeout is reached. | |
| uint64_t | aml_mutex_release (aml_mutex_id_t *mutex) |
| Release a mutex. | |
Variables | |
| static bool | initialized = false |
| static aml_sync_level_t | currentSyncLevel = 0 |
| static list_t | mutexStack |
| static atomic_int32_t | newMutexId = ATOMIC_VAR_INIT(1) |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |