2023-06-27 14:51:04 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023 Sequans Communications
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <zephyr/drivers/hwspinlock.h>
|
2023-09-27 06:46:01 +08:00
|
|
|
#include <zephyr/internal/syscall_handler.h>
|
2023-06-27 14:51:04 +08:00
|
|
|
|
|
|
|
static inline int z_vrfy_hwspinlock_trylock(const struct device *dev, uint32_t id)
|
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, trylock));
|
2023-06-27 14:51:04 +08:00
|
|
|
return z_impl_hwspinlock_trylock(dev, id);
|
|
|
|
}
|
|
|
|
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/hwspinlock_trylock_mrsh.c>
|
2023-06-27 14:51:04 +08:00
|
|
|
|
|
|
|
static inline void z_vrfy_hwspinlock_lock(const struct device *dev, uint32_t id)
|
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, lock));
|
2023-06-27 14:51:04 +08:00
|
|
|
z_impl_hwspinlock_lock(dev, id);
|
|
|
|
}
|
|
|
|
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/hwspinlock_lock_mrsh.c>
|
2023-06-27 14:51:04 +08:00
|
|
|
|
|
|
|
static inline void z_vrfy_hwspinlock_unlock(const struct device *dev, uint32_t id)
|
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, unlock));
|
2023-06-27 14:51:04 +08:00
|
|
|
z_impl_hwspinlock_unlock(dev, id);
|
|
|
|
}
|
|
|
|
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/hwspinlock_unlock_mrsh.c>
|
2023-06-27 14:51:04 +08:00
|
|
|
|
|
|
|
static inline uint32_t z_vrfy_hwspinlock_get_max_id(const struct device *dev)
|
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, get_max_id));
|
2023-06-27 14:51:04 +08:00
|
|
|
return z_impl_hwspinlock_get_max_id(dev);
|
|
|
|
}
|
|
|
|
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/hwspinlock_get_max_id_mrsh.c>
|