# sched_yield ________________________________________________
# long sys_sched_yield(void)
#

@define _SYSCALL_SCHED_YIELD_NAME
%(
	name = "sched_yield"
%)

@define _SYSCALL_SCHED_YIELD_ARGSTR
%(
	argstr = ""
%)

probe syscall.sched_yield = dw_syscall.sched_yield !, nd_syscall.sched_yield {}
probe syscall.sched_yield.return = dw_syscall.sched_yield.return !,
                                   nd_syscall.sched_yield.return {}

# dw_sched_yield _____________________________________________________

probe dw_syscall.sched_yield = kernel.function("sys_sched_yield").call
{
	@_SYSCALL_SCHED_YIELD_NAME
	@_SYSCALL_SCHED_YIELD_ARGSTR
}
probe dw_syscall.sched_yield.return = kernel.function("sys_sched_yield").return
{
	@_SYSCALL_SCHED_YIELD_NAME
	retstr = return_str(1, $return)
}

# nd_sched_yield _____________________________________________________

probe nd_syscall.sched_yield = kprobe.function("sys_sched_yield")
{
	@_SYSCALL_SCHED_YIELD_NAME
	@_SYSCALL_SCHED_YIELD_ARGSTR
}
probe nd_syscall.sched_yield.return = kprobe.function("sys_sched_yield").return
{
	@_SYSCALL_SCHED_YIELD_NAME
	retstr = returnstr(1)
}
