diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-08-28 18:05:55 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-08-28 18:05:55 +0200 |
commit | 508dc4f8eece1a70c493afc6511fdf5934fef567 (patch) | |
tree | b852a6a5bf9977a33a87158985de02d188ba71d7 /arch/alpha/kernel/osf_sys.c | |
parent | 734e9a26d612f64e1c9cfd92256969b773954ae2 (diff) | |
parent | e3e45c01ae690e65f2650e5288b9af802e95a136 (diff) | |
download | op-kernel-dev-508dc4f8eece1a70c493afc6511fdf5934fef567.zip op-kernel-dev-508dc4f8eece1a70c493afc6511fdf5934fef567.tar.gz |
Merge branch 'perf/urgent' into perf/core
Pick up the latest fixes because upcoming uprobes changes will rely on it.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/alpha/kernel/osf_sys.c')
-rw-r--r-- | arch/alpha/kernel/osf_sys.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 98a1036..bc1acdd 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -1404,3 +1404,52 @@ SYSCALL_DEFINE3(osf_writev, unsigned long, fd, } #endif + +SYSCALL_DEFINE2(osf_getpriority, int, which, int, who) +{ + int prio = sys_getpriority(which, who); + if (prio >= 0) { + /* Return value is the unbiased priority, i.e. 20 - prio. + This does result in negative return values, so signal + no error */ + force_successful_syscall_return(); + prio = 20 - prio; + } + return prio; +} + +SYSCALL_DEFINE0(getxuid) +{ + current_pt_regs()->r20 = sys_geteuid(); + return sys_getuid(); +} + +SYSCALL_DEFINE0(getxgid) +{ + current_pt_regs()->r20 = sys_getegid(); + return sys_getgid(); +} + +SYSCALL_DEFINE0(getxpid) +{ + current_pt_regs()->r20 = sys_getppid(); + return sys_getpid(); +} + +SYSCALL_DEFINE0(alpha_pipe) +{ + int fd[2]; + int res = do_pipe_flags(fd, 0); + if (!res) { + /* The return values are in $0 and $20. */ + current_pt_regs()->r20 = fd[1]; + res = fd[0]; + } + return res; +} + +SYSCALL_DEFINE1(sethae, unsigned long, val) +{ + current_pt_regs()->hae = val; + return 0; +} |