7#ifndef ZEPHYR_INCLUDE_SYS_MUTEX_H_
8#define ZEPHYR_INCLUDE_SYS_MUTEX_H_
23#ifdef CONFIG_USERSPACE
53#define SYS_MUTEX_DEFINE(name) \
130 return z_sys_mutex_kernel_unlock(
mutex);
133#include <syscalls/mutex.h>
143#define SYS_MUTEX_DEFINE(name) \
144 struct sys_mutex name = { \
145 .kernel_mutex = Z_MUTEX_INITIALIZER(name.kernel_mutex) \
int atomic_t
Definition: atomic.h:21
ZTEST_BMEM int timeout
Definition: main.c:31
int k_mutex_unlock(struct k_mutex *mutex)
Unlock a mutex.
int k_mutex_init(struct k_mutex *mutex)
Initialize a mutex.
int k_mutex_lock(struct k_mutex *mutex, k_timeout_t timeout)
Lock a mutex.
static void sys_mutex_init(struct sys_mutex *mutex)
Initialize a mutex.
Definition: mutex.h:70
static int sys_mutex_lock(struct sys_mutex *mutex, k_timeout_t timeout)
Lock a mutex.
Definition: mutex.h:104
static int sys_mutex_unlock(struct sys_mutex *mutex)
Unlock a mutex.
Definition: mutex.h:127
struct k_mutex mutex
Definition: kobject.c:1310
Definition: kernel.h:2680
Kernel timeout type.
Definition: sys_clock.h:65
atomic_t val
Definition: mutex.h:33