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

#ifndef Z_INCLUDE_SYSCALLS_ZTEST_TEST_H
#define Z_INCLUDE_SYSCALLS_ZTEST_TEST_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_ztest_run_test_suites(const void * state, bool shuffle, int suite_iter, int case_iter);

__pinned_func
static inline int ztest_run_test_suites(const void * state, bool shuffle, int suite_iter, int case_iter)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const void * val; } parm0 = { .val = state };
		union { uintptr_t x; bool val; } parm1 = { .val = shuffle };
		union { uintptr_t x; int val; } parm2 = { .val = suite_iter };
		union { uintptr_t x; int val; } parm3 = { .val = case_iter };
		return (int) arch_syscall_invoke4(parm0.x, parm1.x, parm2.x, parm3.x, K_SYSCALL_ZTEST_RUN_TEST_SUITES);
	}
#endif
	compiler_barrier();
	return z_impl_ztest_run_test_suites(state, shuffle, suite_iter, case_iter);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define ztest_run_test_suites(state, shuffle, suite_iter, case_iter) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_ZTEST_RUN_TEST_SUITES, ztest_run_test_suites, state, shuffle, suite_iter, case_iter); 	syscall__retval = ztest_run_test_suites(state, shuffle, suite_iter, case_iter); 	sys_port_trace_syscall_exit(K_SYSCALL_ZTEST_RUN_TEST_SUITES, ztest_run_test_suites, state, shuffle, suite_iter, case_iter, syscall__retval); 	syscall__retval; })
#endif
#endif


extern void z_impl___ztest_set_test_result(enum ztest_result new_result);

__pinned_func
static inline void __ztest_set_test_result(enum ztest_result new_result)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; enum ztest_result val; } parm0 = { .val = new_result };
		(void) arch_syscall_invoke1(parm0.x, K_SYSCALL___ZTEST_SET_TEST_RESULT);
		return;
	}
#endif
	compiler_barrier();
	z_impl___ztest_set_test_result(new_result);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define __ztest_set_test_result(new_result) do { 	sys_port_trace_syscall_enter(K_SYSCALL___ZTEST_SET_TEST_RESULT, __ztest_set_test_result, new_result); 	__ztest_set_test_result(new_result); 	sys_port_trace_syscall_exit(K_SYSCALL___ZTEST_SET_TEST_RESULT, __ztest_set_test_result, new_result); } while(false)
#endif
#endif


extern void z_impl___ztest_set_test_phase(enum ztest_phase new_phase);

__pinned_func
static inline void __ztest_set_test_phase(enum ztest_phase new_phase)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; enum ztest_phase val; } parm0 = { .val = new_phase };
		(void) arch_syscall_invoke1(parm0.x, K_SYSCALL___ZTEST_SET_TEST_PHASE);
		return;
	}
#endif
	compiler_barrier();
	z_impl___ztest_set_test_phase(new_phase);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define __ztest_set_test_phase(new_phase) do { 	sys_port_trace_syscall_enter(K_SYSCALL___ZTEST_SET_TEST_PHASE, __ztest_set_test_phase, new_phase); 	__ztest_set_test_phase(new_phase); 	sys_port_trace_syscall_exit(K_SYSCALL___ZTEST_SET_TEST_PHASE, __ztest_set_test_phase, new_phase); } while(false)
#endif
#endif


extern void z_impl_z_test_1cpu_start(void);

__pinned_func
static inline void z_test_1cpu_start(void)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		(void) arch_syscall_invoke0(K_SYSCALL_Z_TEST_1CPU_START);
		return;
	}
#endif
	compiler_barrier();
	z_impl_z_test_1cpu_start();
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define z_test_1cpu_start() do { 	sys_port_trace_syscall_enter(K_SYSCALL_Z_TEST_1CPU_START, z_test_1cpu_start); 	z_test_1cpu_start(); 	sys_port_trace_syscall_exit(K_SYSCALL_Z_TEST_1CPU_START, z_test_1cpu_start); } while(false)
#endif
#endif


extern void z_impl_z_test_1cpu_stop(void);

__pinned_func
static inline void z_test_1cpu_stop(void)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		(void) arch_syscall_invoke0(K_SYSCALL_Z_TEST_1CPU_STOP);
		return;
	}
#endif
	compiler_barrier();
	z_impl_z_test_1cpu_stop();
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define z_test_1cpu_stop() do { 	sys_port_trace_syscall_enter(K_SYSCALL_Z_TEST_1CPU_STOP, z_test_1cpu_stop); 	z_test_1cpu_stop(); 	sys_port_trace_syscall_exit(K_SYSCALL_Z_TEST_1CPU_STOP, z_test_1cpu_stop); } while(false)
#endif
#endif


extern void z_impl_sys_clock_tick_set(uint64_t tick);

__pinned_func
static inline void sys_clock_tick_set(uint64_t tick)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { struct { uintptr_t lo, hi; } split; uint64_t val; } parm0 = { .val = tick };
		(void) arch_syscall_invoke2(parm0.split.lo, parm0.split.hi, K_SYSCALL_SYS_CLOCK_TICK_SET);
		return;
	}
#endif
	compiler_barrier();
	z_impl_sys_clock_tick_set(tick);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define sys_clock_tick_set(tick) do { 	sys_port_trace_syscall_enter(K_SYSCALL_SYS_CLOCK_TICK_SET, sys_clock_tick_set, tick); 	sys_clock_tick_set(tick); 	sys_port_trace_syscall_exit(K_SYSCALL_SYS_CLOCK_TICK_SET, sys_clock_tick_set, tick); } while(false)
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
