7#ifndef ZEPHYR_INCLUDE_SYS_MUTEX_H_
8#define ZEPHYR_INCLUDE_SYS_MUTEX_H_
23#ifdef CONFIG_USERSPACE
53#define SYS_MUTEX_DEFINE(name) \
77__syscall
int z_sys_mutex_kernel_lock(
struct sys_mutex *mutex,
80__syscall
int z_sys_mutex_kernel_unlock(
struct sys_mutex *mutex);
105 return z_sys_mutex_kernel_lock(mutex, timeout);
128 return z_sys_mutex_kernel_unlock(mutex);
131#include <zephyr/syscalls/mutex.h>
141#define SYS_MUTEX_DEFINE(name) \
142 struct sys_mutex name = { \
143 .kernel_mutex = Z_MUTEX_INITIALIZER(name.kernel_mutex) \
long atomic_t
Definition: atomic_types.h:15
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:68
static int sys_mutex_lock(struct sys_mutex *mutex, k_timeout_t timeout)
Lock a mutex.
Definition: mutex.h:102
static int sys_mutex_unlock(struct sys_mutex *mutex)
Unlock a mutex.
Definition: mutex.h:125
Mutex Structure.
Definition: kernel.h:2917
Kernel timeout type.
Definition: sys_clock.h:65
atomic_t val
Definition: mutex.h:33
Variables needed for system clock.