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