1 | // SPDX-License-Identifier: GPL-3.0-or-later |
---|---|
2 | |
3 | #pragma once |
4 | |
5 | #include <mos/moslib_global.h> |
6 | #include <mos/types.h> |
7 | |
8 | typedef futex_word_t mutex_t; |
9 | #define MUTEX_INIT 0 |
10 | |
11 | should_inline void mutex_init(mutex_t *mutex) |
12 | { |
13 | *mutex = MUTEX_INIT; |
14 | } |
15 | |
16 | MOSAPI void mutex_acquire(mutex_t *mutex); |
17 | MOSAPI void mutex_release(mutex_t *mutex); |
18 |