diff options
author | 2003-12-11 23:02:30 +0000 | |
---|---|---|
committer | 2003-12-11 23:02:30 +0000 | |
commit | c1f74b45732c57baf2962e97f56eca235500643c (patch) | |
tree | c2e341794f12ee67b8f4f0219c6e91f4588af9ca | |
parent | POSIX says rlim_t should be unsigned so make it u_quad_t. Also add (diff) | |
download | wireguard-openbsd-c1f74b45732c57baf2962e97f56eca235500643c.tar.xz wireguard-openbsd-c1f74b45732c57baf2962e97f56eca235500643c.zip |
Add id_t type as per POSIX and use it for [gs]etpriority(2).
OK henning@ and deraadt@
-rw-r--r-- | lib/libc/sys/getpriority.2 | 6 | ||||
-rw-r--r-- | share/man/man5/types.5 | 3 | ||||
-rw-r--r-- | sys/kern/kern_resource.c | 6 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 6 | ||||
-rw-r--r-- | sys/sys/resource.h | 6 | ||||
-rw-r--r-- | sys/sys/types.h | 3 |
6 files changed, 16 insertions, 14 deletions
diff --git a/lib/libc/sys/getpriority.2 b/lib/libc/sys/getpriority.2 index 5c4a42c177c..b0ae6490f11 100644 --- a/lib/libc/sys/getpriority.2 +++ b/lib/libc/sys/getpriority.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getpriority.2,v 1.9 2003/06/02 20:18:39 millert Exp $ +.\" $OpenBSD: getpriority.2,v 1.10 2003/12/11 23:02:30 millert Exp $ .\" $NetBSD: getpriority.2,v 1.4 1995/02/27 12:33:15 cgd Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -41,9 +41,9 @@ .Fd #include <sys/time.h> .Fd #include <sys/resource.h> .Ft int -.Fn getpriority "int which" "int who" +.Fn getpriority "int which" "id_t who" .Ft int -.Fn setpriority "int which" "int who" "int prio" +.Fn setpriority "int which" "id_t who" "int prio" .Sh DESCRIPTION The scheduling priority of the process, process group, or user, as indicated by diff --git a/share/man/man5/types.5 b/share/man/man5/types.5 index fbab7bc4b77..990a0b27e48 100644 --- a/share/man/man5/types.5 +++ b/share/man/man5/types.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: types.5,v 1.9 2003/12/11 22:55:22 millert Exp $ +.\" $OpenBSD: types.5,v 1.10 2003/12/11 23:02:30 millert Exp $ .\" $NetBSD: types.5,v 1.4 1997/07/10 06:56:38 mikel Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 @@ -74,6 +74,7 @@ typedef int32_t daddr_t; /* disk address */ typedef int32_t dev_t; /* device number */ typedef u_int32_t fixpt_t; /* fixed point number */ typedef u_int32_t gid_t; /* group id */ +typedef u_int32_t id_t; /* may contain pid, uid or gid */ typedef u_int32_t ino_t; /* inode number */ typedef long key_t; /* IPC key (for Sys V IPC) */ typedef u_int16_t mode_t; /* permissions */ diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 1eab6bddb54..1e868518989 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_resource.c,v 1.25 2003/12/11 22:55:22 millert Exp $ */ +/* $OpenBSD: kern_resource.c,v 1.26 2003/12/11 23:02:30 millert Exp $ */ /* $NetBSD: kern_resource.c,v 1.38 1996/10/23 07:19:38 matthias Exp $ */ /*- @@ -68,7 +68,7 @@ sys_getpriority(curp, v, retval) { register struct sys_getpriority_args /* { syscallarg(int) which; - syscallarg(int) who; + syscallarg(id_t) who; } */ *uap = v; register struct proc *p; register int low = NZERO + PRIO_MAX + 1; @@ -126,7 +126,7 @@ sys_setpriority(curp, v, retval) { register struct sys_setpriority_args /* { syscallarg(int) which; - syscallarg(int) who; + syscallarg(id_t) who; syscallarg(int) prio; } */ *uap = v; register struct proc *p; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 80d9878d0b7..a4ab6e5a97c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.63 2003/12/10 23:10:08 millert Exp $ +; $OpenBSD: syscalls.master,v 1.64 2003/12/11 23:02:30 millert Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -193,13 +193,13 @@ fd_set *ex, struct timeval *tv); } 94 UNIMPL setdopt 95 STD { int sys_fsync(int fd); } -96 STD { int sys_setpriority(int which, int who, int prio); } +96 STD { int sys_setpriority(int which, id_t who, int prio); } 97 STD { int sys_socket(int domain, int type, int protocol); } 98 STD { int sys_connect(int s, const struct sockaddr *name, \ socklen_t namelen); } 99 COMPAT_43 { int sys_accept(int s, caddr_t name, \ int *anamelen); } oaccept -100 STD { int sys_getpriority(int which, int who); } +100 STD { int sys_getpriority(int which, id_t who); } 101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ int flags); } osend 102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ diff --git a/sys/sys/resource.h b/sys/sys/resource.h index fc0ebbc226d..46577eef8f2 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -1,4 +1,4 @@ -/* $OpenBSD: resource.h,v 1.6 2003/12/11 22:55:22 millert Exp $ */ +/* $OpenBSD: resource.h,v 1.7 2003/12/11 23:02:30 millert Exp $ */ /* $NetBSD: resource.h,v 1.14 1996/02/09 18:25:27 christos Exp $ */ /* @@ -117,10 +117,10 @@ int donice(struct proc *, struct proc *, int); #include <sys/cdefs.h> __BEGIN_DECLS -int getpriority(int, int); +int getpriority(int, id_t); int getrlimit(int, struct rlimit *); int getrusage(int, struct rusage *); -int setpriority(int, int, int); +int setpriority(int, id_t, int); int setrlimit(int, const struct rlimit *); __END_DECLS diff --git a/sys/sys/types.h b/sys/sys/types.h index 12756d517ea..bc675728f21 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.22 2003/12/11 22:55:22 millert Exp $ */ +/* $OpenBSD: types.h,v 1.23 2003/12/11 23:02:30 millert Exp $ */ /* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ /*- @@ -67,6 +67,7 @@ typedef int32_t daddr_t; /* disk address */ typedef int32_t dev_t; /* device number */ typedef u_int32_t fixpt_t; /* fixed point number */ typedef u_int32_t gid_t; /* group id */ +typedef u_int32_t id_t; /* may contain pid, uid or gid */ typedef u_int32_t ino_t; /* inode number */ typedef long key_t; /* IPC key (for Sys V IPC) */ typedef u_int16_t mode_t; /* permissions */ |