summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Graichen <graichen@cvs.openbsd.org>1997-04-14 11:16:32 +0000
committerThomas Graichen <graichen@cvs.openbsd.org>1997-04-14 11:16:32 +0000
commitf3fb98deada0edda8b7f4c2f75e085b2000b67ea (patch)
treed15ad22cd87984a181a35e0f3b8adb9efd0349ce
parentb08861122f892f935fbae1cac2f2ee0e7af7fb3c (diff)
#34 - linux_sys_nice from NetBSD
-rw-r--r--sys/compat/linux/linux_misc.c19
-rw-r--r--sys/compat/linux/linux_syscall.h5
-rw-r--r--sys/compat/linux/linux_syscallargs.h9
-rw-r--r--sys/compat/linux/linux_syscalls.c6
-rw-r--r--sys/compat/linux/linux_sysent.c8
-rw-r--r--sys/compat/linux/syscalls.master4
6 files changed, 33 insertions, 18 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index bac41ab08d6..68b17182919 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.6 1996/08/10 12:09:23 deraadt Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.7 1997/04/14 11:16:23 graichen Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*
@@ -1163,3 +1163,20 @@ linux_sys___sysctl(p, v, retval)
return sys___sysctl(p, &bsa, retval);
}
+
+int
+linux_sys_nice(p, v, retval)
+ struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ struct linux_sys_nice_args /* {
+ syscallarg(int) incr;
+ } */ *uap = v;
+ struct sys_setpriority_args bsa;
+
+ SCARG(&bsa, which) = PRIO_PROCESS;
+ SCARG(&bsa, who) = 0;
+ SCARG(&bsa, prio) = SCARG(uap, incr);
+ return sys_setpriority(p, &bsa, retval);
+}
diff --git a/sys/compat/linux/linux_syscall.h b/sys/compat/linux/linux_syscall.h
index 0265a9e83ce..703a9dd490c 100644
--- a/sys/compat/linux/linux_syscall.h
+++ b/sys/compat/linux/linux_syscall.h
@@ -1,10 +1,8 @@
-/* $OpenBSD: linux_syscall.h,v 1.6 1996/08/02 20:35:21 niklas Exp $ */
-
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.5 1996/04/28 07:38:24 etheisen Exp
+ * created from OpenBSD: syscalls.master,v 1.7 1996/05/22 12:01:51 deraadt Exp
*/
#define LINUX_SYS_syscall 0
@@ -37,6 +35,7 @@
#define LINUX_SYS_pause 29
#define LINUX_SYS_utime 30
#define LINUX_SYS_access 33
+#define LINUX_SYS_nice 34
#define LINUX_SYS_sync 36
#define LINUX_SYS_kill 37
#define LINUX_SYS_rename 38
diff --git a/sys/compat/linux/linux_syscallargs.h b/sys/compat/linux/linux_syscallargs.h
index 1654d8342c2..9b1404b16e9 100644
--- a/sys/compat/linux/linux_syscallargs.h
+++ b/sys/compat/linux/linux_syscallargs.h
@@ -1,10 +1,8 @@
-/* $OpenBSD: linux_syscallargs.h,v 1.7 1996/08/02 20:35:22 niklas Exp $ */
-
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.5 1996/04/28 07:38:24 etheisen Exp
+ * created from OpenBSD: syscalls.master,v 1.7 1996/05/22 12:01:51 deraadt Exp
*/
#define syscallarg(x) union { x datum; register_t pad; }
@@ -91,6 +89,10 @@ struct linux_sys_access_args {
syscallarg(int) flags;
};
+struct linux_sys_nice_args {
+ syscallarg(int) incr;
+};
+
struct linux_sys_kill_args {
syscallarg(int) pid;
syscallarg(int) signum;
@@ -372,6 +374,7 @@ int linux_sys_alarm __P((struct proc *, void *, register_t *));
int linux_sys_pause __P((struct proc *, void *, register_t *));
int linux_sys_utime __P((struct proc *, void *, register_t *));
int linux_sys_access __P((struct proc *, void *, register_t *));
+int linux_sys_nice __P((struct proc *, void *, register_t *));
int sys_sync __P((struct proc *, void *, register_t *));
int linux_sys_kill __P((struct proc *, void *, register_t *));
int linux_sys_rename __P((struct proc *, void *, register_t *));
diff --git a/sys/compat/linux/linux_syscalls.c b/sys/compat/linux/linux_syscalls.c
index 601c7880146..4c425d33865 100644
--- a/sys/compat/linux/linux_syscalls.c
+++ b/sys/compat/linux/linux_syscalls.c
@@ -1,10 +1,8 @@
-/* $OpenBSD: linux_syscalls.c,v 1.6 1996/08/02 20:35:22 niklas Exp $ */
-
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.5 1996/04/28 07:38:24 etheisen Exp
+ * created from OpenBSD: syscalls.master,v 1.7 1996/05/22 12:01:51 deraadt Exp
*/
char *linux_syscallnames[] = {
@@ -42,7 +40,7 @@ char *linux_syscallnames[] = {
"#31 (unimplemented stty)", /* 31 = unimplemented stty */
"#32 (unimplemented gtty)", /* 32 = unimplemented gtty */
"access", /* 33 = access */
- "#34 (unimplemented nice)", /* 34 = unimplemented nice */
+ "nice", /* 34 = nice */
"#35 (unimplemented ftime)", /* 35 = unimplemented ftime */
"sync", /* 36 = sync */
"kill", /* 37 = kill */
diff --git a/sys/compat/linux/linux_sysent.c b/sys/compat/linux/linux_sysent.c
index 0768f8ed901..d352f4c8d10 100644
--- a/sys/compat/linux/linux_sysent.c
+++ b/sys/compat/linux/linux_sysent.c
@@ -1,10 +1,8 @@
-/* $OpenBSD: linux_sysent.c,v 1.7 1996/08/02 20:35:22 niklas Exp $ */
-
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from OpenBSD: syscalls.master,v 1.5 1996/04/28 07:38:24 etheisen Exp
+ * created from OpenBSD: syscalls.master,v 1.7 1996/05/22 12:01:51 deraadt Exp
*/
#include <sys/param.h>
@@ -88,8 +86,8 @@ struct sysent linux_sysent[] = {
sys_nosys }, /* 32 = unimplemented gtty */
{ 2, s(struct linux_sys_access_args),
linux_sys_access }, /* 33 = access */
- { 0, 0,
- sys_nosys }, /* 34 = unimplemented nice */
+ { 1, s(struct linux_sys_nice_args),
+ linux_sys_nice }, /* 34 = nice */
{ 0, 0,
sys_nosys }, /* 35 = unimplemented ftime */
{ 0, 0,
diff --git a/sys/compat/linux/syscalls.master b/sys/compat/linux/syscalls.master
index 3bcb21655c6..86f3b30de4b 100644
--- a/sys/compat/linux/syscalls.master
+++ b/sys/compat/linux/syscalls.master
@@ -1,4 +1,4 @@
- $OpenBSD: syscalls.master,v 1.7 1996/05/22 12:01:51 deraadt Exp $
+ $OpenBSD: syscalls.master,v 1.8 1997/04/14 11:16:31 graichen Exp $
; $NetBSD: syscalls.master,v 1.15 1995/12/18 14:35:10 fvdl Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -83,7 +83,7 @@
31 UNIMPL stty
32 UNIMPL gtty
33 STD { int linux_sys_access(char *path, int flags); }
-34 UNIMPL nice
+34 STD { int linux_sys_nice(int incr); }
35 UNIMPL ftime
36 NOARGS { int sys_sync(void); }
37 STD { int linux_sys_kill(int pid, int signum); }