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

#ifndef Z_INCLUDE_SYSCALLS_CLOCK_MONITOR_H
#define Z_INCLUDE_SYSCALLS_CLOCK_MONITOR_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_clock_monitor_configure(const struct device * dev, const struct clock_monitor_config * cfg);

static inline int clock_monitor_configure(const struct device * dev, const struct clock_monitor_config * cfg)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; const struct clock_monitor_config * val; } parm1 = { .val = cfg };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_CLOCK_MONITOR_CONFIGURE);
	}
#endif
	compiler_barrier();
	return z_impl_clock_monitor_configure(dev, cfg);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define clock_monitor_configure(dev, cfg) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CLOCK_MONITOR_CONFIGURE, clock_monitor_configure, dev, cfg); 	syscall__retval = clock_monitor_configure(dev, cfg); 	sys_port_trace_syscall_exit(K_SYSCALL_CLOCK_MONITOR_CONFIGURE, clock_monitor_configure, dev, cfg, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_clock_monitor_start(const struct device * dev);

static inline int clock_monitor_start(const struct device * dev)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		return (int) arch_syscall_invoke1(parm0.x, K_SYSCALL_CLOCK_MONITOR_START);
	}
#endif
	compiler_barrier();
	return z_impl_clock_monitor_start(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define clock_monitor_start(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CLOCK_MONITOR_START, clock_monitor_start, dev); 	syscall__retval = clock_monitor_start(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_CLOCK_MONITOR_START, clock_monitor_start, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_clock_monitor_stop(const struct device * dev);

static inline int clock_monitor_stop(const struct device * dev)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		return (int) arch_syscall_invoke1(parm0.x, K_SYSCALL_CLOCK_MONITOR_STOP);
	}
#endif
	compiler_barrier();
	return z_impl_clock_monitor_stop(dev);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define clock_monitor_stop(dev) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CLOCK_MONITOR_STOP, clock_monitor_stop, dev); 	syscall__retval = clock_monitor_stop(dev); 	sys_port_trace_syscall_exit(K_SYSCALL_CLOCK_MONITOR_STOP, clock_monitor_stop, dev, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_clock_monitor_get_rate(const struct device * dev, uint32_t * rate_hz);

static inline int clock_monitor_get_rate(const struct device * dev, uint32_t * rate_hz)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; uint32_t * val; } parm1 = { .val = rate_hz };
		return (int) arch_syscall_invoke2(parm0.x, parm1.x, K_SYSCALL_CLOCK_MONITOR_GET_RATE);
	}
#endif
	compiler_barrier();
	return z_impl_clock_monitor_get_rate(dev, rate_hz);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define clock_monitor_get_rate(dev, rate_hz) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CLOCK_MONITOR_GET_RATE, clock_monitor_get_rate, dev, rate_hz); 	syscall__retval = clock_monitor_get_rate(dev, rate_hz); 	sys_port_trace_syscall_exit(K_SYSCALL_CLOCK_MONITOR_GET_RATE, clock_monitor_get_rate, dev, rate_hz, syscall__retval); 	syscall__retval; })
#endif
#endif


extern int z_impl_clock_monitor_set_source(const struct device * dev, uint32_t reference, uint32_t target);

static inline int clock_monitor_set_source(const struct device * dev, uint32_t reference, uint32_t target)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		union { uintptr_t x; const struct device * val; } parm0 = { .val = dev };
		union { uintptr_t x; uint32_t val; } parm1 = { .val = reference };
		union { uintptr_t x; uint32_t val; } parm2 = { .val = target };
		return (int) arch_syscall_invoke3(parm0.x, parm1.x, parm2.x, K_SYSCALL_CLOCK_MONITOR_SET_SOURCE);
	}
#endif
	compiler_barrier();
	return z_impl_clock_monitor_set_source(dev, reference, target);
}

#if defined(CONFIG_TRACING_SYSCALL)
#ifndef DISABLE_SYSCALL_TRACING

#define clock_monitor_set_source(dev, reference, target) ({ 	int syscall__retval; 	sys_port_trace_syscall_enter(K_SYSCALL_CLOCK_MONITOR_SET_SOURCE, clock_monitor_set_source, dev, reference, target); 	syscall__retval = clock_monitor_set_source(dev, reference, target); 	sys_port_trace_syscall_exit(K_SYSCALL_CLOCK_MONITOR_SET_SOURCE, clock_monitor_set_source, dev, reference, target, syscall__retval); 	syscall__retval; })
#endif
#endif


#ifdef __cplusplus
}
#endif

#endif
#endif /* include guard */
