# sched_get_priority_max _____________________________________
#
# asmlinkage long
# sys_sched_get_priority_max(int policy)
#

@define _SYSCALL_SCHED_GET_PRIORITY_MAX_NAME
%(
	name = "sched_get_priority_max"
%)

@define _SYSCALL_SCHED_GET_PRIORITY_MAX_ARGSTR
%(
	argstr = policy_str
%)

probe syscall.sched_get_priority_max = dw_syscall.sched_get_priority_max !,
                                       nd_syscall.sched_get_priority_max ? {}
probe syscall.sched_get_priority_max.return = dw_syscall.sched_get_priority_max.return !,
                                              nd_syscall.sched_get_priority_max.return ? {}

# dw_sched_get_priority_max _____________________________________________________

probe dw_syscall.sched_get_priority_max = kernel.function("sys_sched_get_priority_max").call
{
	@_SYSCALL_SCHED_GET_PRIORITY_MAX_NAME
	policy = __int32($policy)
	policy_str = _sched_policy_str(policy)
	@_SYSCALL_SCHED_GET_PRIORITY_MAX_ARGSTR
}
probe dw_syscall.sched_get_priority_max.return = kernel.function("sys_sched_get_priority_max").return
{
	@_SYSCALL_SCHED_GET_PRIORITY_MAX_NAME
	retstr = return_str(1, $return)
}

# nd_sched_get_priority_max _____________________________________________________

probe nd_syscall.sched_get_priority_max = kprobe.function("sys_sched_get_priority_max") ?
{
	@_SYSCALL_SCHED_GET_PRIORITY_MAX_NAME
	asmlinkage()
	policy = int_arg(1)
	policy_str = _sched_policy_str(policy)
	@_SYSCALL_SCHED_GET_PRIORITY_MAX_ARGSTR
}
probe nd_syscall.sched_get_priority_max.return = kprobe.function("sys_sched_get_priority_max").return ?
{
	@_SYSCALL_SCHED_GET_PRIORITY_MAX_NAME
	retstr = returnstr(1)
}
