diff options
author | peter <peter@FreeBSD.org> | 1995-12-15 05:00:31 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-15 05:00:31 +0000 |
commit | 4749bf08aea8e8271a379ecc191f7d7c40796b6b (patch) | |
tree | 1bd7e1ba263e5f6a89502e3e3dd4b12512785d03 /sys | |
parent | e7734481579a66c9373b359458f1e3b2e3cf061b (diff) | |
download | FreeBSD-src-4749bf08aea8e8271a379ecc191f7d7c40796b6b.zip FreeBSD-src-4749bf08aea8e8271a379ecc191f7d7c40796b6b.tar.gz |
Update sysv_*.c to get their argument definitions from sysproto.h
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sysv_msg.c | 36 | ||||
-rw-r--r-- | sys/kern/sysv_sem.c | 41 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 22 |
3 files changed, 68 insertions, 31 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index ef4a0ac..4329393 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -1,4 +1,4 @@ -/* $Id: sysv_msg.c,v 1.9 1995/10/21 19:49:57 bde Exp $ */ +/* $Id: sysv_msg.c,v 1.10 1995/12/14 08:31:51 phk Exp $ */ /* * Implementation of SVID messages @@ -33,14 +33,16 @@ SYSINIT(sysv_msg, SI_SUB_SYSV_MSG, SI_ORDER_FIRST, msginit, NULL) #define MSG_DEBUG #undef MSG_DEBUG_OK +#ifndef _SYS_SYSPROTO_H_ struct msgctl_args; -static int msgctl __P((struct proc *p, struct msgctl_args *uap, int *retval)); +int msgctl __P((struct proc *p, struct msgctl_args *uap, int *retval)); struct msgget_args; -static int msgget __P((struct proc *p, struct msgget_args *uap, int *retval)); +int msgget __P((struct proc *p, struct msgget_args *uap, int *retval)); struct msgsnd_args; -static int msgsnd __P((struct proc *p, struct msgsnd_args *uap, int *retval)); +int msgsnd __P((struct proc *p, struct msgsnd_args *uap, int *retval)); struct msgrcv_args; -static int msgrcv __P((struct proc *p, struct msgrcv_args *uap, int *retval)); +int msgrcv __P((struct proc *p, struct msgrcv_args *uap, int *retval)); +#endif static void msg_freehdr __P((struct msg *msghdr)); /* XXX casting to (sy_call_t *) is bogus, as usual. */ @@ -161,13 +163,15 @@ msg_freehdr(msghdr) free_msghdrs = msghdr; } +#ifndef _SYS_SYSPROTO_H_ struct msgctl_args { int msqid; int cmd; - struct msqid_ds *user_msqptr; + struct msqid_ds *buf; }; +#endif -static int +int msgctl(p, uap, retval) struct proc *p; register struct msgctl_args *uap; @@ -175,7 +179,7 @@ msgctl(p, uap, retval) { int msqid = uap->msqid; int cmd = uap->cmd; - struct msqid_ds *user_msqptr = uap->user_msqptr; + struct msqid_ds *user_msqptr = uap->buf; struct ucred *cred = p->p_ucred; int rval, eval; struct msqid_ds msqbuf; @@ -296,12 +300,14 @@ msgctl(p, uap, retval) return(eval); } +#ifndef _SYS_SYSPROTO_H_ struct msgget_args { key_t key; int msgflg; }; +#endif -static int +int msgget(p, uap, retval) struct proc *p; register struct msgget_args *uap; @@ -401,21 +407,23 @@ found: return(0); } +#ifndef _SYS_SYSPROTO_H_ struct msgsnd_args { int msqid; - void *user_msgp; + void *msgp; size_t msgsz; int msgflg; }; +#endif -static int +int msgsnd(p, uap, retval) struct proc *p; register struct msgsnd_args *uap; int *retval; { int msqid = uap->msqid; - void *user_msgp = uap->user_msgp; + void *user_msgp = uap->msgp; size_t msgsz = uap->msgsz; int msgflg = uap->msgflg; int segs_needed, eval; @@ -735,6 +743,7 @@ msgsnd(p, uap, retval) return(0); } +#ifndef _SYS_SYSPROTO_H_ struct msgrcv_args { int msqid; void *msgp; @@ -742,8 +751,9 @@ struct msgrcv_args { long msgtyp; int msgflg; }; +#endif -static int +int msgrcv(p, uap, retval) struct proc *p; register struct msgrcv_args *uap; diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index 866d6ae..04f36ea 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,4 +1,4 @@ -/* $Id: sysv_sem.c,v 1.10 1995/10/21 19:49:59 bde Exp $ */ +/* $Id: sysv_sem.c,v 1.11 1995/12/14 08:31:52 phk Exp $ */ /* * Implementation of SVID semaphores @@ -19,15 +19,17 @@ static void seminit __P((void *)); SYSINIT(sysv_sem, SI_SUB_SYSV_SEM, SI_ORDER_FIRST, seminit, NULL) -struct semctl_args; -static int semctl __P((struct proc *p, struct semctl_args *uap, int *retval)); +#ifndef _SYS_SYSPROTO_H_ +struct __semctl_args; +int __semctl __P((struct proc *p, struct __semctl_args *uap, int *retval)); struct semget_args; -static int semget __P((struct proc *p, struct semget_args *uap, int *retval)); +int semget __P((struct proc *p, struct semget_args *uap, int *retval)); struct semop_args; -static int semop __P((struct proc *p, struct semop_args *uap, int *retval)); +int semop __P((struct proc *p, struct semop_args *uap, int *retval)); struct semconfig_args; -static int semconfig __P((struct proc *p, struct semconfig_args *uap, +int semconfig __P((struct proc *p, struct semconfig_args *uap, int *retval)); +#endif static struct sem_undo *semu_alloc __P((struct proc *p)); static int semundo_adjust __P((struct proc *p, struct sem_undo **supptr, @@ -37,7 +39,7 @@ static void semexit __P((struct proc *p)); /* XXX casting to (sy_call_t *) is bogus, as usual. */ static sy_call_t *semcalls[] = { - (sy_call_t *)semctl, (sy_call_t *)semget, + (sy_call_t *)__semctl, (sy_call_t *)semget, (sy_call_t *)semop, (sy_call_t *)semconfig }; @@ -112,11 +114,13 @@ semsys(p, uap, retval) * in /dev/kmem. */ +#ifndef _SYS_SYSPROTO_H_ struct semconfig_args { semconfig_ctl_t flag; }; +#endif -static int +int semconfig(p, uap, retval) struct proc *p; struct semconfig_args *uap; @@ -315,17 +319,22 @@ semundo_clear(semid, semnum) } } -struct semctl_args { +/* + * Note that the user-mode half of this passes a union, not a pointer + */ +#ifndef _SYS_SYSPROTO_H_ +struct __semctl_args { int semid; int semnum; int cmd; union semun *arg; }; +#endif -static int -semctl(p, uap, retval) +int +__semctl(p, uap, retval) struct proc *p; - register struct semctl_args *uap; + register struct __semctl_args *uap; int *retval; { int semid = uap->semid; @@ -479,13 +488,15 @@ semctl(p, uap, retval) return(eval); } +#ifndef _SYS_SYSPROTO_H_ struct semget_args { key_t key; int nsems; int semflg; }; +#endif -static int +int semget(p, uap, retval) struct proc *p; register struct semget_args *uap; @@ -592,13 +603,15 @@ found: return(0); } +#ifndef _SYS_SYSPROTO_H_ struct semop_args { int semid; struct sembuf *sops; int nsops; }; +#endif -static int +int semop(p, uap, retval) struct proc *p; register struct semop_args *uap; diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 95db1b9..23d33e8 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $Id: sysv_shm.c,v 1.13 1995/12/07 12:46:55 davidg Exp $ */ +/* $Id: sysv_shm.c,v 1.14 1995/12/14 08:31:54 phk Exp $ */ /* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /* @@ -51,6 +51,7 @@ #include <vm/vm_kern.h> #include <vm/vm_extern.h> +#ifndef _SYS_SYSPROTO_H_ struct shmat_args; extern int shmat __P((struct proc *p, struct shmat_args *uap, int *retval)); struct shmctl_args; @@ -59,6 +60,7 @@ struct shmdt_args; extern int shmdt __P((struct proc *p, struct shmdt_args *uap, int *retval)); struct shmget_args; extern int shmget __P((struct proc *p, struct shmget_args *uap, int *retval)); +#endif static void shminit __P((void *)); SYSINIT(sysv_shm, SI_SUB_SYSV_SHM, SI_ORDER_FIRST, shminit, NULL) @@ -171,9 +173,12 @@ shm_delete_mapping(p, shmmap_s) return 0; } +#ifndef _SYS_SYSPROTO_H_ struct shmdt_args { void *shmaddr; }; +#endif + int shmdt(p, uap, retval) struct proc *p; @@ -195,11 +200,14 @@ shmdt(p, uap, retval) return shm_delete_mapping(p, shmmap_s); } +#ifndef _SYS_SYSPROTO_H_ struct shmat_args { int shmid; void *shmaddr; int shmflg; }; +#endif + int shmat(p, uap, retval) struct proc *p; @@ -327,11 +335,14 @@ oshmctl(p, uap, retval) #endif } +#ifndef _SYS_SYSPROTO_H_ struct shmctl_args { int shmid; int cmd; - struct shmid_ds *ubuf; + struct shmid_ds *buf; }; +#endif + int shmctl(p, uap, retval) struct proc *p; @@ -351,7 +362,7 @@ shmctl(p, uap, retval) error = ipcperm(cred, &shmseg->shm_perm, IPC_R); if (error) return error; - error = copyout((caddr_t)shmseg, uap->ubuf, sizeof(inbuf)); + error = copyout((caddr_t)shmseg, uap->buf, sizeof(inbuf)); if (error) return error; break; @@ -359,7 +370,7 @@ shmctl(p, uap, retval) error = ipcperm(cred, &shmseg->shm_perm, IPC_M); if (error) return error; - error = copyin(uap->ubuf, (caddr_t)&inbuf, sizeof(inbuf)); + error = copyin(uap->buf, (caddr_t)&inbuf, sizeof(inbuf)); if (error) return error; shmseg->shm_perm.uid = inbuf.shm_perm.uid; @@ -390,11 +401,14 @@ shmctl(p, uap, retval) return 0; } +#ifndef _SYS_SYSPROTO_H_ struct shmget_args { key_t key; size_t size; int shmflg; }; +#endif + static int shmget_existing(p, uap, mode, segnum, retval) struct proc *p; |