diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-11 23:02:31 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-12-11 23:02:31 +0000 |
commit | aaa928e4cff4b60cd813352d124af8477c807977 (patch) | |
tree | 707b38d5f66b102e7b31d662d445ce727382f7ee /sys | |
parent | 59cbe93f72d84866d77fe36d4fd2311b152566d0 (diff) |
Add id_t type as per POSIX and use it for [gs]etpriority(2).
OK henning@ and deraadt@
Diffstat (limited to 'sys')
-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 |
4 files changed, 11 insertions, 10 deletions
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 */ |