PatchworkOS
Loading...
Searching...
No Matches
mutex.h
Go to the documentation of this file.
1#pragma once
2
4#include <kernel/sync/mutex.h>
5
6typedef struct aml_thread aml_thread_t;
7
29
36
43
56
66
struct aml_thread aml_thread_t
Definition mutex.h:6
uint8_t aml_sync_level_t
Definition named.h:135
uint64_t aml_mutex_id_t
Mutex id.
Definition mutex.h:28
uint64_t aml_mutex_release(aml_mutex_id_t *mutex)
Release a mutex.
Definition mutex.c:114
void aml_mutex_id_init(aml_mutex_id_t *mutex)
Create a new mutex and return its id.
Definition mutex.c:84
void aml_mutex_id_deinit(aml_mutex_id_t *mutex)
Destroy the mutex with the given id.
Definition mutex.c:89
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.
Definition mutex.c:94
__UINT64_TYPE__ clock_t
A nanosecond time.
Definition clock_t.h:13
static mtx_t mutex
Definition heap.c:35
__UINT64_TYPE__ uint64_t
Definition stdint.h:17