summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/svr4_misc.c
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-03-28 22:03:50 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-03-28 22:03:50 +0000
commit17c1b573084fbe31277afcf0184b23be51f98726 (patch)
tree1d8a890a748e14d17419c20cc5b0cf6ac95b7c87 /sys/compat/svr4/svr4_misc.c
parentd5565a3d188495c0791f7ed4e5a33119be1ec372 (diff)
added 34 - nice
Diffstat (limited to 'sys/compat/svr4/svr4_misc.c')
-rw-r--r--sys/compat/svr4/svr4_misc.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 800cab4e53c..26ed549f208 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_misc.c,v 1.8 1997/02/13 19:45:19 niklas Exp $ */
+/* $OpenBSD: svr4_misc.c,v 1.9 1997/03/28 22:03:46 kstailey Exp $ */
/* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */
/*
@@ -1292,3 +1292,26 @@ svr4_sys_memcntl(p, v, retval)
/* XXX: no locking, invalidating, or syncing supported */
return sys_mprotect(p, &ap, retval);
}
+
+int
+svr4_sys_nice(p, v, retval)
+ register struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ struct svr4_sys_nice_args *uap = v;
+ struct sys_setpriority_args ap;
+ int error;
+
+ SCARG(&ap, which) = PRIO_PROCESS;
+ SCARG(&ap, who) = 0;
+ SCARG(&ap, prio) = SCARG(uap, prio);
+
+ if ((error = sys_setpriority(p, &ap, retval)) != 0)
+ return error;
+
+ if ((error = sys_getpriority(p, &ap, retval)) != 0)
+ return error;
+
+ return 0;
+}