asmlinkage long ia64_getpriority (int which, int who) { long prio; prio = sys_getpriority(which, who); if (prio >= 0) { force_successful_syscall_return(); prio = 20 - prio; } return prio; }
/* * Alpha syscall convention has no problem returning negative * values: */ asmlinkage int osf_getpriority(int which, int who, int a2, int a3, int a4, int a5, struct pt_regs regs) { extern int sys_getpriority(int, int); int prio; prio = sys_getpriority(which, who); if (prio < 0) return prio; regs.r0 = 0; /* special return: no errors */ return 20 - prio; }
asmlinkage long ia64_getpriority (int which, int who, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7, long stack) { struct pt_regs *regs = (struct pt_regs *) &stack; extern long sys_getpriority (int, int); long prio; prio = sys_getpriority(which, who); if (prio >= 0) { regs->r8 = 0; /* ensure negative priority is not mistaken as error code */ prio = 20 - prio; } return prio; }
int linux32_sys_getpriority(struct lwp *l, const struct linux32_sys_getpriority_args *uap, register_t *retval) { /* { syscallarg(int) which; syscallarg(int) who; } */ struct sys_getpriority_args bsa; int error; SCARG(&bsa, which) = SCARG(uap, which); SCARG(&bsa, who) = SCARG(uap, who); if ((error = sys_getpriority(l, &bsa, retval))) return error; *retval = NZERO - *retval; return 0; }
long compat_sys_getpriority(u32 which, u32 who) { /* sign extend which and who */ return sys_getpriority((int)which, (int)who); }
long compat_sys_getpriority(u32 which, u32 who) { return sys_getpriority((int)which, (int)who); }