ReactOS 0.4.16-dev-1946-g52006dd
mutex.h
Go to the documentation of this file.
1#pragma once
2
4#include <uacpi/kernel_api.h>
5
6#ifndef UACPI_BAREBONES_MODE
7
9
12
14{
15 if (uacpi_unlikely(mtx == UACPI_NULL))
17
18 return uacpi_kernel_acquire_mutex(mtx, 0xFFFF);
19}
20
23);
24
26{
27 if (uacpi_unlikely(mtx == UACPI_NULL))
29
31 return UACPI_STATUS_OK;
32}
33
35 uacpi_handle mtx
36)
37{
38 if (mtx == UACPI_NULL)
39 return UACPI_STATUS_OK;
40
41 return uacpi_kernel_acquire_mutex(mtx, 0xFFFF);
42}
43
45 uacpi_handle mtx
46)
47{
48 if (mtx == UACPI_NULL)
49 return UACPI_STATUS_OK;
50
52 return UACPI_STATUS_OK;
53}
54
59};
60
63
66
71};
72
75
78
81
82#endif // !UACPI_BAREBONES_MODE
uacpi_status uacpi_rw_lock_deinit(struct uacpi_rw_lock *lock)
Definition: mutex.c:333
uacpi_status uacpi_acquire_native_mutex_with_timeout(uacpi_handle mtx, uacpi_u16 timeout)
static uacpi_status uacpi_release_native_mutex(uacpi_handle mtx)
Definition: mutex.h:25
uacpi_status uacpi_recursive_lock_deinit(struct uacpi_recursive_lock *lock)
Definition: mutex.c:267
uacpi_status uacpi_acquire_aml_mutex(uacpi_mutex *, uacpi_u16 timeout)
Definition: mutex.c:201
static uacpi_status uacpi_acquire_native_mutex_may_be_null(uacpi_handle mtx)
Definition: mutex.h:34
static uacpi_status uacpi_acquire_native_mutex(uacpi_handle mtx)
Definition: mutex.h:13
uacpi_status uacpi_rw_lock_init(struct uacpi_rw_lock *lock)
Definition: mutex.c:316
uacpi_status uacpi_recursive_lock_init(struct uacpi_recursive_lock *lock)
Definition: mutex.c:255
uacpi_status uacpi_rw_unlock_read(struct uacpi_rw_lock *lock)
Definition: mutex.c:371
uacpi_status uacpi_rw_unlock_write(struct uacpi_rw_lock *lock)
Definition: mutex.c:391
uacpi_status uacpi_release_aml_mutex(uacpi_mutex *)
Definition: mutex.c:241
uacpi_bool uacpi_this_thread_owns_aml_mutex(uacpi_mutex *)
Definition: mutex.c:193
uacpi_status uacpi_rw_lock_read(struct uacpi_rw_lock *lock)
Definition: mutex.c:353
uacpi_status uacpi_recursive_lock_acquire(struct uacpi_recursive_lock *lock)
Definition: mutex.c:287
uacpi_status uacpi_rw_lock_write(struct uacpi_rw_lock *lock)
Definition: mutex.c:386
static uacpi_status uacpi_release_native_mutex_may_be_null(uacpi_handle mtx)
Definition: mutex.h:44
uacpi_status uacpi_recursive_lock_release(struct uacpi_recursive_lock *lock)
Definition: mutex.c:307
#define uacpi_unlikely(expr)
Definition: compiler.h:58
size_t uacpi_size
Definition: types.h:37
bool uacpi_bool
Definition: types.h:31
uint16_t uacpi_u16
Definition: types.h:20
#define UACPI_NULL
Definition: types.h:33
uacpi_status
Definition: status.h:10
@ UACPI_STATUS_INVALID_ARGUMENT
Definition: status.h:18
@ UACPI_STATUS_OK
Definition: status.h:11
void uacpi_kernel_release_mutex(uacpi_handle)
Definition: uacpiosl.c:159
uacpi_status uacpi_kernel_acquire_mutex(uacpi_handle, uacpi_u16)
Definition: uacpiosl.c:152
Definition: dhcpd.h:248
uacpi_thread_id owner
Definition: mutex.h:58
uacpi_handle mutex
Definition: mutex.h:56
uacpi_size depth
Definition: mutex.h:57
uacpi_size num_readers
Definition: mutex.h:70
uacpi_handle read_mutex
Definition: mutex.h:68
uacpi_handle write_mutex
Definition: mutex.h:69
rwlock_t lock
Definition: tcpcore.h:0