/* auto-generated by gen_syscalls.py, don't edit */

#ifndef Z_INCLUDE_SYSCALLS_CRC_H
#define Z_INCLUDE_SYSCALLS_CRC_H


#include <zephyr/tracing/tracing_syscall.h>

#ifndef _ASMLANGUAGE

#include <stdarg.h>

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

#include <zephyr/linker/sections.h>


#ifdef __cplusplus
extern "C" {
#endif

extern int z_impl_crc_begin(const struct device * dev, struct crc_ctx * ctx);

static inline int crc_begin(const struct device * dev, struct crc_ctx * ctx)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; struct crc_ctx * val; } parm1 = { .val = ctx };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_CRC_BEGIN);
	}
#endif
	compiler_barrier();
	return z_impl_crc_begin(dev, ctx);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define crc_begin(dev, ctx) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CRC_BEGIN, crc_begin, dev, ctx); 	syscall__retval = crc_begin(dev, ctx); 	sys_port_trace_syscall_exit(K_SYSCALL_CRC_BEGIN, crc_begin, dev, ctx, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_crc_update(const struct device * dev, struct crc_ctx * ctx, const void * buffer, size_t bufsize);

static inline int crc_update(const struct device * dev, struct crc_ctx * ctx, const void * buffer, size_t bufsize)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; struct crc_ctx * val; } parm1 = { .val = ctx };
		union { uintptr_t x; const void * val; } parm2 = { .val = buffer };
		union { uintptr_t x; size_t val; } parm3 = { .val = bufsize };
		return (int) arch_syscall_invoke4(parm0.x, parm1.x, parm2.x, parm3.x, K_SYSCALL_CRC_UPDATE);
	}
#endif
	compiler_barrier();
	return z_impl_crc_update(dev, ctx, buffer, bufsize);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define crc_update(dev, ctx, buffer, bufsize) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CRC_UPDATE, crc_update, dev, ctx, buffer, bufsize); 	syscall__retval = crc_update(dev, ctx, buffer, bufsize); 	sys_port_trace_syscall_exit(K_SYSCALL_CRC_UPDATE, crc_update, dev, ctx, buffer, bufsize, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_crc_finish(const struct device * dev, struct crc_ctx * ctx);

static inline int crc_finish(const struct device * dev, struct crc_ctx * ctx)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; struct crc_ctx * val; } parm1 = { .val = ctx };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_CRC_FINISH);
	}
#endif
	compiler_barrier();
	return z_impl_crc_finish(dev, ctx);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define crc_finish(dev, ctx) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CRC_FINISH, crc_finish, dev, ctx); 	syscall__retval = crc_finish(dev, ctx); 	sys_port_trace_syscall_exit(K_SYSCALL_CRC_FINISH, crc_finish, dev, ctx, syscall__retval); 	syscall__retval; })
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
