aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/osf_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel/osf_sys.c')
-rw-r--r--arch/alpha/kernel/osf_sys.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 98a103621af6..bc1acdda7a5e 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,
1404} 1404}
1405 1405
1406#endif 1406#endif
1407
1408SYSCALL_DEFINE2(osf_getpriority, int, which, int, who)
1409{
1410 int prio = sys_getpriority(which, who);
1411 if (prio >= 0) {
1412 /* Return value is the unbiased priority, i.e. 20 - prio.
1413 This does result in negative return values, so signal
1414 no error */
1415 force_successful_syscall_return();
1416 prio = 20 - prio;
1417 }
1418 return prio;
1419}
1420
1421SYSCALL_DEFINE0(getxuid)
1422{
1423 current_pt_regs()->r20 = sys_geteuid();
1424 return sys_getuid();
1425}
1426
1427SYSCALL_DEFINE0(getxgid)
1428{
1429 current_pt_regs()->r20 = sys_getegid();
1430 return sys_getgid();
1431}
1432
1433SYSCALL_DEFINE0(getxpid)
1434{
1435 current_pt_regs()->r20 = sys_getppid();
1436 return sys_getpid();
1437}
1438
1439SYSCALL_DEFINE0(alpha_pipe)
1440{
1441 int fd[2];
1442 int res = do_pipe_flags(fd, 0);
1443 if (!res) {
1444 /* The return values are in $0 and $20. */
1445 current_pt_regs()->r20 = fd[1];
1446 res = fd[0];
1447 }
1448 return res;
1449}
1450
1451SYSCALL_DEFINE1(sethae, unsigned long, val)
1452{
1453 current_pt_regs()->hae = val;
1454 return 0;
1455}