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

#ifndef Z_INCLUDE_SYSCALLS_ZTEST_ERROR_HOOK_H
#define Z_INCLUDE_SYSCALLS_ZTEST_ERROR_HOOK_H


#include <zephyr/tracing/tracing_syscall.h>

#ifndef _ASMLANGUAGE

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

#include <zephyr/linker/sections.h>


#ifdef __cplusplus
extern "C" {
#endif

extern void z_impl_ztest_set_fault_valid(bool valid);

__pinned_func
static inline void ztest_set_fault_valid(bool valid)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; bool val; } parm0 = { .val = valid };
		(void) arch_syscall_invoke1(parm0.x, K_SYSCALL_ZTEST_SET_FAULT_VALID);
		return;
	}
#endif
	compiler_barrier();
	z_impl_ztest_set_fault_valid(valid);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define ztest_set_fault_valid(valid) do { 	sys_port_trace_syscall_enter(K_SYSCALL_ZTEST_SET_FAULT_VALID, ztest_set_fault_valid, valid); 	ztest_set_fault_valid(valid); 	sys_port_trace_syscall_exit(K_SYSCALL_ZTEST_SET_FAULT_VALID, ztest_set_fault_valid, valid); } while(false)
#endif
#endif


extern void z_impl_ztest_set_assert_valid(bool valid);

__pinned_func
static inline void ztest_set_assert_valid(bool valid)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; bool val; } parm0 = { .val = valid };
		(void) arch_syscall_invoke1(parm0.x, K_SYSCALL_ZTEST_SET_ASSERT_VALID);
		return;
	}
#endif
	compiler_barrier();
	z_impl_ztest_set_assert_valid(valid);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define ztest_set_assert_valid(valid) do { 	sys_port_trace_syscall_enter(K_SYSCALL_ZTEST_SET_ASSERT_VALID, ztest_set_assert_valid, valid); 	ztest_set_assert_valid(valid); 	sys_port_trace_syscall_exit(K_SYSCALL_ZTEST_SET_ASSERT_VALID, ztest_set_assert_valid, valid); } while(false)
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
