
/* auto-generated by gen_syscalls.py, don't edit */
#ifndef Z_INCLUDE_SYSCALLS_IVSHMEM_H
#define Z_INCLUDE_SYSCALLS_IVSHMEM_H


#ifndef _ASMLANGUAGE

#include <syscall_list.h>
#include <syscall.h>

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#if !defined(__XCC__)
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern size_t z_impl_ivshmem_get_mem(const struct device * dev, uintptr_t * memmap);
static inline size_t ivshmem_get_mem(const struct device * dev, uintptr_t * memmap)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (size_t) arch_syscall_invoke2(*(uintptr_t *)&dev, *(uintptr_t *)&memmap, K_SYSCALL_IVSHMEM_GET_MEM);
	}
#endif
	compiler_barrier();
	return z_impl_ivshmem_get_mem(dev, memmap);
}


extern uint32_t z_impl_ivshmem_get_id(const struct device * dev);
static inline uint32_t ivshmem_get_id(const struct device * dev)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (uint32_t) arch_syscall_invoke1(*(uintptr_t *)&dev, K_SYSCALL_IVSHMEM_GET_ID);
	}
#endif
	compiler_barrier();
	return z_impl_ivshmem_get_id(dev);
}


extern uint16_t z_impl_ivshmem_get_vectors(const struct device * dev);
static inline uint16_t ivshmem_get_vectors(const struct device * dev)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (uint16_t) arch_syscall_invoke1(*(uintptr_t *)&dev, K_SYSCALL_IVSHMEM_GET_VECTORS);
	}
#endif
	compiler_barrier();
	return z_impl_ivshmem_get_vectors(dev);
}


extern int z_impl_ivshmem_int_peer(const struct device * dev, uint32_t peer_id, uint16_t vector);
static inline int ivshmem_int_peer(const struct device * dev, uint32_t peer_id, uint16_t vector)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&peer_id, *(uintptr_t *)&vector, K_SYSCALL_IVSHMEM_INT_PEER);
	}
#endif
	compiler_barrier();
	return z_impl_ivshmem_int_peer(dev, peer_id, vector);
}


extern int z_impl_ivshmem_register_handler(const struct device * dev, struct k_poll_signal * signal, uint16_t vector);
static inline int ivshmem_register_handler(const struct device * dev, struct k_poll_signal * signal, uint16_t vector)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&signal, *(uintptr_t *)&vector, K_SYSCALL_IVSHMEM_REGISTER_HANDLER);
	}
#endif
	compiler_barrier();
	return z_impl_ivshmem_register_handler(dev, signal, vector);
}


#ifdef __cplusplus
}
#endif

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif

#endif
#endif /* include guard */
