-/* $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 $ */
/*
/* 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;
+}
#define SVR4_SYS_pause 29
#define SVR4_SYS_utime 30
#define SVR4_SYS_access 33
+#define SVR4_SYS_nice 34
#define SVR4_SYS_sync 36
#define SVR4_SYS_kill 37
#define SVR4_SYS_pgrpsys 39
syscallarg(int) flags;
};
+struct svr4_sys_nice_args {
+ syscallarg(int) prio;
+};
+
struct svr4_sys_kill_args {
syscallarg(int) pid;
syscallarg(int) signum;
int svr4_sys_pause __P((struct proc *, void *, register_t *));
int svr4_sys_utime __P((struct proc *, void *, register_t *));
int svr4_sys_access __P((struct proc *, void *, register_t *));
+int svr4_sys_nice __P((struct proc *, void *, register_t *));
int sys_sync __P((struct proc *, void *, register_t *));
int svr4_sys_kill __P((struct proc *, void *, register_t *));
int svr4_sys_pgrpsys __P((struct proc *, void *, register_t *));
"#31 (unimplemented was stty)", /* 31 = unimplemented was stty */
"#32 (unimplemented was gtty)", /* 32 = unimplemented was gtty */
"access", /* 33 = access */
- "#34 (unimplemented nice)", /* 34 = unimplemented nice */
+ "nice", /* 34 = nice */
"#35 (unimplemented statfs)", /* 35 = unimplemented statfs */
"sync", /* 36 = sync */
"kill", /* 37 = kill */
sys_nosys }, /* 32 = unimplemented was gtty */
{ 2, s(struct svr4_sys_access_args),
svr4_sys_access }, /* 33 = access */
- { 0, 0,
- sys_nosys }, /* 34 = unimplemented nice */
+ { 1, s(struct svr4_sys_nice_args),
+ svr4_sys_nice }, /* 34 = nice */
{ 0, 0,
sys_nosys }, /* 35 = unimplemented statfs */
{ 0, 0,
- $OpenBSD: syscalls.master,v 1.11 1997/02/13 19:45:27 niklas Exp $
+ $OpenBSD: syscalls.master,v 1.12 1997/03/28 22:03:49 kstailey Exp $
; $NetBSD: syscalls.master,v 1.17 1996/02/10 17:12:51 christos Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
31 UNIMPL was stty
32 UNIMPL was gtty
33 STD { int svr4_sys_access(char *path, int flags); }
-34 UNIMPL nice
+34 STD { int svr4_sys_nice(int prio); }
35 UNIMPL statfs
36 NOARGS { int sys_sync(void); }
37 STD { int svr4_sys_kill(int pid, int signum); }