Index: kern/init_sysent.c =================================================================== RCS file: /work/repo/src/sys/kern/init_sysent.c,v retrieving revision 1.137 diff -u -r1.137 init_sysent.c --- kern/init_sysent.c 10 Oct 2002 04:08:11 -0000 1.137 +++ kern/init_sysent.c 16 Oct 2002 20:58:37 -0000 @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.137 2002/10/10 04:08:11 rwatson Exp $ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.128 2002/10/10 04:02:49 rwatson Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.129 2002/10/15 01:36:45 peter Exp */ #include "opt_compat.h" @@ -248,11 +248,11 @@ { AS(nosys_args), (sy_call_t *)lkmnosys }, /* 217 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys }, /* 218 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys }, /* 219 = lkmnosys */ - { SYF_MPSAFE | AS(__semctl_args), (sy_call_t *)lkmressys }, /* 220 = __semctl */ + { SYF_MPSAFE | AS(__osemctl_args), (sy_call_t *)lkmressys }, /* 220 = __osemctl */ { SYF_MPSAFE | AS(semget_args), (sy_call_t *)lkmressys }, /* 221 = semget */ { SYF_MPSAFE | AS(semop_args), (sy_call_t *)lkmressys }, /* 222 = semop */ { 0, (sy_call_t *)nosys }, /* 223 = semconfig */ - { SYF_MPSAFE | AS(msgctl_args), (sy_call_t *)lkmressys }, /* 224 = msgctl */ + { SYF_MPSAFE | AS(omsgctl_args), (sy_call_t *)lkmressys }, /* 224 = omsgctl */ { SYF_MPSAFE | AS(msgget_args), (sy_call_t *)lkmressys }, /* 225 = msgget */ { SYF_MPSAFE | AS(msgsnd_args), (sy_call_t *)lkmressys }, /* 226 = msgsnd */ { SYF_MPSAFE | AS(msgrcv_args), (sy_call_t *)lkmressys }, /* 227 = msgrcv */ @@ -443,4 +443,6 @@ { AS(extattr_set_link_args), (sy_call_t *)extattr_set_link }, /* 412 = extattr_set_link */ { AS(extattr_get_link_args), (sy_call_t *)extattr_get_link }, /* 413 = extattr_get_link */ { AS(extattr_delete_link_args), (sy_call_t *)extattr_delete_link }, /* 414 = extattr_delete_link */ + { SYF_MPSAFE | AS(msgctl_args), (sy_call_t *)lkmressys }, /* 415 = msgctl */ + { SYF_MPSAFE | AS(__semctl_args), (sy_call_t *)lkmressys }, /* 416 = __semctl */ }; Index: kern/syscalls.c =================================================================== RCS file: /work/repo/src/sys/kern/syscalls.c,v retrieving revision 1.122 diff -u -r1.122 syscalls.c --- kern/syscalls.c 10 Oct 2002 04:08:11 -0000 1.122 +++ kern/syscalls.c 16 Oct 2002 20:58:37 -0000 @@ -2,8 +2,8 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.122 2002/10/10 04:08:11 rwatson Exp $ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.128 2002/10/10 04:02:49 rwatson Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.129 2002/10/15 01:36:45 peter Exp */ char *syscallnames[] = { @@ -227,11 +227,11 @@ "lkmnosys", /* 217 = lkmnosys */ "lkmnosys", /* 218 = lkmnosys */ "lkmnosys", /* 219 = lkmnosys */ - "__semctl", /* 220 = __semctl */ + "__osemctl", /* 220 = __osemctl */ "semget", /* 221 = semget */ "semop", /* 222 = semop */ "#223", /* 223 = semconfig */ - "msgctl", /* 224 = msgctl */ + "omsgctl", /* 224 = omsgctl */ "msgget", /* 225 = msgget */ "msgsnd", /* 226 = msgsnd */ "msgrcv", /* 227 = msgrcv */ @@ -422,4 +422,6 @@ "extattr_set_link", /* 412 = extattr_set_link */ "extattr_get_link", /* 413 = extattr_get_link */ "extattr_delete_link", /* 414 = extattr_delete_link */ + "msgctl", /* 415 = msgctl */ + "__semctl", /* 416 = __semctl */ }; Index: kern/syscalls.master =================================================================== RCS file: /work/repo/src/sys/kern/syscalls.master,v retrieving revision 1.129 diff -u -r1.129 syscalls.master --- kern/syscalls.master 15 Oct 2002 01:36:45 -0000 1.129 +++ kern/syscalls.master 16 Oct 2002 19:09:02 -0000 @@ -348,14 +348,14 @@ ; ; The following were introduced with NetBSD/4.4Lite-2 ; They are initialized by thier respective modules/sysinits -220 MNOSTD BSD { int __semctl(int semid, int semnum, int cmd, \ - union semun *arg); } +220 MNOSTD BSD { int __osemctl(int semid, int semnum, int cmd, \ + union osemun *arg); } 221 MNOSTD BSD { int semget(key_t key, int nsems, int semflg); } 222 MNOSTD BSD { int semop(int semid, struct sembuf *sops, \ u_int nsops); } 223 UNIMPL NOHIDE semconfig -224 MNOSTD BSD { int msgctl(int msqid, int cmd, \ - struct msqid_ds *buf); } +224 MNOSTD BSD { int omsgctl(int msqid, int cmd, \ + struct omsqid_ds *buf); } 225 MNOSTD BSD { int msgget(key_t key, int msgflg); } 226 MNOSTD BSD { int msgsnd(int msqid, void *msgp, size_t msgsz, \ int msgflg); } @@ -598,6 +598,10 @@ void *data, size_t nbytes); } 414 STD BSD { int extattr_delete_link(const char *path, \ int attrnamespace, const char *attrname); } +415 MNOSTD BSD { int msgctl(int msqid, int cmd, \ + struct msqid_ds *buf); } +416 MNOSTD BSD { int __semctl(int semid, int semnum, int cmd, \ + union semun *arg); } ; Please copy any additions and changes to the following compatability tables: ; sys/ia64/ia32/syscalls.master (take a best guess) Index: kern/sysv_ipc.c =================================================================== RCS file: /work/repo/src/sys/kern/sysv_ipc.c,v retrieving revision 1.23 diff -u -r1.23 sysv_ipc.c --- kern/sysv_ipc.c 1 Apr 2002 21:31:00 -0000 1.23 +++ kern/sysv_ipc.c 16 Oct 2002 21:18:56 -0000 @@ -73,7 +73,7 @@ int ipcperm(td, perm, mode) struct thread *td; - struct ipc_perm *perm; + struct kipc_perm *perm; int mode; { struct ucred *cred = td->td_ucred; Index: kern/sysv_msg.c =================================================================== RCS file: /work/repo/src/sys/kern/sysv_msg.c,v retrieving revision 1.43 diff -u -r1.43 sysv_msg.c --- kern/sysv_msg.c 13 Aug 2002 08:00:36 -0000 1.43 +++ kern/sysv_msg.c 16 Oct 2002 21:18:37 -0000 @@ -40,6 +40,7 @@ static void msginit(void); static int msgunload(void); static int sysvmsg_modload(struct module *, int, void *); +static int sys_msgctl(struct thread *, int, int, struct kmsqid_ds); #ifdef MSG_DEBUG #define DPRINTF(a) printf a @@ -128,7 +129,7 @@ static char *msgpool; /* MSGMAX byte long msg buffer pool */ static struct msgmap *msgmaps; /* MSGSEG msgmap structures */ static struct msg *msghdrs; /* MSGTQL msg headers */ -static struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */ +static struct kmsqid_ds *msqids; /* MSGMNI msqid_ds struct's */ static struct mtx msq_mtx; /* global mutex for message queues. */ static void @@ -150,7 +151,7 @@ msghdrs = malloc(sizeof(struct msg) * msginfo.msgtql, M_MSG, M_WAITOK); if (msghdrs == NULL) panic("msghdrs is NULL"); - msqids = malloc(sizeof(struct msqid_ds) * msginfo.msgmni, M_MSG, M_WAITOK); + msqids = malloc(sizeof(struct kmsqid_ds) * msginfo.msgmni, M_MSG, M_WAITOK); if (msqids == NULL) panic("msqids is NULL"); @@ -210,7 +211,7 @@ static int msgunload() { - struct msqid_ds *msqptr; + struct kmsqid_ds *msqptr; int msqid; for (msqid = 0; msqid < msginfo.msgmni; msqid++) { @@ -326,6 +327,78 @@ free_msghdrs = msghdr; } + +#ifndef _SYS_SYSPROTO_H_ +struct omsgctl_args { + int msqid; + int cmd; + struct omsqid_ds *buf; +}; +#endif + +/* + * MPSAFE + */ +int +omsgctl(td, uap) + struct thread *td; + register struct omsgctl_args *uap; +{ + struct kmsqid_ds buf; + struct omsqid_ds ubuf; + int error; + + if (uap->cmd == IPC_SET) { + error = copyin(uap->buf, &ubuf, sizeof(ubuf)); + if (error) + return (error); + memset(&buf, 0, sizeof(buf)); + buf.msg_perm.cuid = (uid_t)ubuf.msg_perm.cuid; + buf.msg_perm.cgid = (gid_t)ubuf.msg_perm.cgid; + buf.msg_perm.uid = (uid_t)ubuf.msg_perm.uid; + buf.msg_perm.gid = (gid_t)ubuf.msg_perm.gid; + buf.msg_perm.mode = (mode_t)ubuf.msg_perm.mode; + buf.msg_perm.seq = ubuf.msg_perm.mode; + buf.msg_perm.key = ubuf.msg_perm.key; + buf.msg_first = ubuf.msg_first; + buf.msg_last = ubuf.msg_last; + buf.msg_cbytes = uap->buf->msg_cbytes; + buf.msg_qnum = uap->buf->msg_qnum; + buf.msg_qbytes = uap->buf->msg_qbytes; + buf.msg_lspid = uap->buf->msg_lspid; + buf.msg_lrpid = uap->buf->msg_lrpid; + buf.msg_stime = uap->buf->msg_stime; + buf.msg_rtime = uap->buf->msg_rtime; + buf.msg_ctime = uap->buf->msg_ctime; + } + + error = sys_msgctl(td, uap->msqid, uap->cmd, buf); + if (error == 0 && uap->cmd == IPC_STAT) { + memset(&ubuf, 0, sizeof(ubuf)); + ubuf.msg_perm.cuid = (unsigned short)buf.msg_perm.cuid; + ubuf.msg_perm.cgid = (unsigned short)buf.msg_perm.cgid; + ubuf.msg_perm.uid = (unsigned short)buf.msg_perm.uid; + ubuf.msg_perm.gid = (unsigned short)buf.msg_perm.gid; + ubuf.msg_perm.mode = (unsigned short)buf.msg_perm.mode; + ubuf.msg_perm.seq = buf.msg_perm.mode; + ubuf.msg_perm.key = buf.msg_perm.key; + ubuf.msg_first = buf.msg_first; + ubuf.msg_last = buf.msg_last; + ubuf.msg_cbytes = buf.msg_cbytes; + ubuf.msg_qnum = buf.msg_qnum; + ubuf.msg_qbytes = buf.msg_qbytes; + ubuf.msg_lspid = buf.msg_lspid; + ubuf.msg_lrpid = buf.msg_lrpid; + ubuf.msg_stime = buf.msg_stime; + ubuf.msg_rtime = buf.msg_rtime; + ubuf.msg_ctime = buf.msg_ctime; + error = copyout(&ubuf, uap->buf, sizeof(uap->buf)); + if (error) + return (error); + } + return (error); +} + #ifndef _SYS_SYSPROTO_H_ struct msgctl_args { int msqid; @@ -342,29 +415,84 @@ struct thread *td; register struct msgctl_args *uap; { - int msqid = uap->msqid; - int cmd = uap->cmd; - struct msqid_ds *user_msqptr = uap->buf; - int rval, error; - struct msqid_ds msqbuf; - register struct msqid_ds *msqptr; + struct kmsqid_ds buf; + struct msqid_ds ubuf; + int error; - DPRINTF(("call to msgctl(%d, %d, 0x%x)\n", msqid, cmd, user_msqptr)); + if (uap->cmd == IPC_SET) { + error = copyin(uap->buf, &ubuf, sizeof(ubuf)); + if (error) + return (error); + memset(&buf, 0, sizeof(buf)); + buf.msg_perm.cuid = ubuf.msg_perm.cuid; + buf.msg_perm.cgid = ubuf.msg_perm.cgid; + buf.msg_perm.uid = ubuf.msg_perm.uid; + buf.msg_perm.gid = ubuf.msg_perm.gid; + buf.msg_perm.mode = ubuf.msg_perm.mode; + buf.msg_perm.seq = ubuf.msg_perm.mode; + buf.msg_perm.key = ubuf.msg_perm.key; + buf.msg_first = ubuf.msg_first; + buf.msg_last = ubuf.msg_last; + buf.msg_cbytes = uap->buf->msg_cbytes; + buf.msg_qnum = uap->buf->msg_qnum; + buf.msg_qbytes = uap->buf->msg_qbytes; + buf.msg_lspid = uap->buf->msg_lspid; + buf.msg_lrpid = uap->buf->msg_lrpid; + buf.msg_stime = uap->buf->msg_stime; + buf.msg_rtime = uap->buf->msg_rtime; + buf.msg_ctime = uap->buf->msg_ctime; + } + + error = sys_msgctl(td, uap->msqid, uap->cmd, buf); + if (error == 0 && uap->cmd == IPC_STAT) { + memset(&ubuf, 0, sizeof(ubuf)); + ubuf.msg_perm.cuid = buf.msg_perm.cuid; + ubuf.msg_perm.cgid = buf.msg_perm.cgid; + ubuf.msg_perm.uid = buf.msg_perm.uid; + ubuf.msg_perm.gid = buf.msg_perm.uid; + ubuf.msg_perm.mode = buf.msg_perm.mode; + ubuf.msg_perm.seq = buf.msg_perm.mode; + ubuf.msg_perm.key = buf.msg_perm.key; + ubuf.msg_first = buf.msg_first; + ubuf.msg_last = buf.msg_last; + ubuf.msg_cbytes = buf.msg_cbytes; + ubuf.msg_qnum = buf.msg_qnum; + ubuf.msg_qbytes = buf.msg_qbytes; + ubuf.msg_lspid = buf.msg_lspid; + ubuf.msg_lrpid = buf.msg_lrpid; + ubuf.msg_stime = buf.msg_stime; + ubuf.msg_rtime = buf.msg_rtime; + ubuf.msg_ctime = buf.msg_ctime; + error = copyout(&ubuf, uap->buf, sizeof(uap->buf)); + if (error) + return (error); + } + return (error); +} + +static int +sys_msgctl(td, msqid, cmd, msqbuf) + struct thread *td; + int msqid; + int cmd; + struct kmsqid_ds msqbuf; +{ + int lmsqid, rval, error; + struct kmsqid_ds *msqptr; + + DPRINTF(("call to msgctl(%d, %d, 0x%x)\n", msqid, cmd, msqptr)); if (!jail_sysvipc_allowed && jailed(td->td_ucred)) return (ENOSYS); - msqid = IPCID_TO_IX(msqid); + lmsqid = IPCID_TO_IX(msqid); - if (msqid < 0 || msqid >= msginfo.msgmni) { - DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqid, + if (lmsqid < 0 || lmsqid >= msginfo.msgmni) { + DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", lmsqid, msginfo.msgmni)); return (EINVAL); } - if (cmd == IPC_SET && - (error = copyin(user_msqptr, &msqbuf, sizeof(msqbuf))) != 0) - return (error); - msqptr = &msqids[msqid]; + msqptr = &msqids[lmsqid]; mtx_lock(&msq_mtx); if (msqptr->msg_qbytes == 0) { @@ -372,7 +500,7 @@ error = EINVAL; goto done2; } - if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) { + if (msqptr->msg_perm.seq != IPCID_TO_SEQ(msqid)) { DPRINTF(("wrong sequence number\n")); error = EINVAL; goto done2; @@ -456,8 +584,6 @@ td->td_retval[0] = rval; done2: mtx_unlock(&msq_mtx); - if (cmd == IPC_STAT && error == 0) - error = copyout(msqptr, user_msqptr, sizeof(struct msqid_ds)); return(error); } @@ -480,7 +606,7 @@ int key = uap->key; int msgflg = uap->msgflg; struct ucred *cred = td->td_ucred; - register struct msqid_ds *msqptr = NULL; + register struct kmsqid_ds *msqptr = NULL; DPRINTF(("msgget(0x%x, 0%o)\n", key, msgflg)); @@ -585,7 +711,7 @@ size_t msgsz = uap->msgsz; int msgflg = uap->msgflg; int segs_needed, error = 0; - register struct msqid_ds *msqptr; + register struct kmsqid_ds *msqptr; register struct msg *msghdr; short next; @@ -887,7 +1013,7 @@ long msgtyp = uap->msgtyp; int msgflg = uap->msgflg; size_t len; - register struct msqid_ds *msqptr; + register struct kmsqid_ds *msqptr; register struct msg *msghdr; int error = 0; short next; @@ -1135,7 +1261,7 @@ { return (SYSCTL_OUT(req, msqids, - sizeof(struct msqid_ds) * msginfo.msgmni)); + sizeof(struct kmsqid_ds) * msginfo.msgmni)); } SYSCTL_DECL(_kern_ipc); Index: sys/ipc.h =================================================================== RCS file: /work/repo/src/sys/sys/ipc.h,v retrieving revision 1.21 diff -u -r1.21 ipc.h --- sys/ipc.h 14 Oct 2002 20:50:41 -0000 1.21 +++ sys/ipc.h 16 Oct 2002 21:20:16 -0000 @@ -73,10 +73,32 @@ #define _UID_T_DECLARED #endif -/* - * XXX almost all members have wrong types. - */ +#ifdef _KERNEL +struct kipc_perm { + long foo[5]; /* XXX imaginary permission filler. */ + uid_t cuid; /* creator user id */ + gid_t cgid; /* creator group id */ + uid_t uid; /* user id */ + gid_t gid; /* group id */ + mode_t mode; /* r/w permission */ + unsigned short seq; /* sequence # (to generate unique msg/sem/shm id) */ + key_t key; /* user specified msg/sem/shm key */ +}; +#endif + struct ipc_perm { + uid_t cuid; /* creator user id */ + gid_t cgid; /* creator group id */ + uid_t uid; /* user id */ + gid_t gid; /* group id */ + mode_t mode; /* r/w permission */ + unsigned short seq; /* sequence # (to generate unique msg/sem/shm id) */ + key_t key; /* user specified msg/sem/shm key */ +}; + + +#if __BSD_VISIBLE +struct oipc_perm { ushort cuid; /* creator user id */ ushort cgid; /* creator group id */ ushort uid; /* user id */ @@ -85,6 +107,7 @@ ushort seq; /* sequence # (to generate unique msg/sem/shm id) */ key_t key; /* user specified msg/sem/shm key */ }; +#endif #if __BSD_VISIBLE /* common mode bits */ @@ -116,7 +139,7 @@ struct thread; struct proc; -int ipcperm(struct thread *, struct ipc_perm *, int); +int ipcperm(struct thread *, struct kipc_perm *, int); extern void (*shmfork_hook)(struct proc *, struct proc *); extern void (*shmexit_hook)(struct proc *); Index: sys/msg.h =================================================================== RCS file: /work/repo/src/sys/sys/msg.h,v retrieving revision 1.13 diff -u -r1.13 msg.h --- sys/msg.h 16 Aug 2002 07:42:18 -0000 1.13 +++ sys/msg.h 16 Oct 2002 20:16:12 -0000 @@ -23,6 +23,8 @@ #ifndef _SYS_MSG_H_ #define _SYS_MSG_H_ +#include +#include #include /* @@ -32,15 +34,70 @@ #define MSG_NOERROR 010000 /* don't complain about too long msgs */ +typedef unsigned long msgqnum_t; +typedef unsigned long msglen_t; + +#ifndef _PID_T_DECLARED +typedef __pid_t pid_t; +#define _PID_T_DECLARED +#endif + +#ifndef _TIME_T_DECLARED +typedef __time_t time_t; +#define _TIME_T_DECLARED +#endif + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +#ifndef _SSIZE_T_DECLARED +typedef __ssize_t ssize_t; +#define _SSIZE_T_DECLARED +#endif + struct msg; +#ifdef _KERNEL +struct kmsqid_ds { + struct kipc_perm msg_perm; /* msg queue permission bits */ + struct msg *msg_first; /* first message in the queue */ + struct msg *msg_last; /* last message in the queue */ + msglen_t msg_cbytes; /* number of bytes in use on the queue */ + msgqnum_t msg_qnum; /* number of msgs in the queue */ + msglen_t msg_qbytes; /* max # of bytes on the queue */ + pid_t msg_lspid; /* pid of last msgsnd() */ + pid_t msg_lrpid; /* pid of last msgrcv() */ + time_t msg_stime; /* time of last msgsnd() */ + time_t msg_rtime; /* time of last msgrcv() */ + time_t msg_ctime; /* time of last msgctl() */ +}; +#endif + struct msqid_ds { struct ipc_perm msg_perm; /* msg queue permission bits */ struct msg *msg_first; /* first message in the queue */ struct msg *msg_last; /* last message in the queue */ - u_long msg_cbytes; /* number of bytes in use on the queue */ - u_long msg_qnum; /* number of msgs in the queue */ - u_long msg_qbytes; /* max # of bytes on the queue */ + msglen_t msg_cbytes; /* number of bytes in use on the queue */ + msgqnum_t msg_qnum; /* number of msgs in the queue */ + msglen_t msg_qbytes; /* max # of bytes on the queue */ + pid_t msg_lspid; /* pid of last msgsnd() */ + pid_t msg_lrpid; /* pid of last msgrcv() */ + time_t msg_stime; /* time of last msgsnd() */ + time_t msg_rtime; /* time of last msgrcv() */ + time_t msg_ctime; /* time of last msgctl() */ + /* XXX do we need padding here? */ +}; + +#if __BSD_VISIBLE +struct omsqid_ds { + struct oipc_perm msg_perm; /* msg queue permission bits */ + struct msg *msg_first; /* first message in the queue */ + struct msg *msg_last; /* last message in the queue */ + msglen_t msg_cbytes; /* number of bytes in use on the queue */ + msgqnum_t msg_qnum; /* number of msgs in the queue */ + msglen_t msg_qbytes; /* max # of bytes on the queue */ pid_t msg_lspid; /* pid of last msgsnd() */ pid_t msg_lrpid; /* pid of last msgrcv() */ time_t msg_stime; /* time of last msgsnd() */ @@ -51,7 +108,9 @@ long msg_pad3; long msg_pad4[4]; }; +#endif +#if __BSD_VISIBLE /* * Structure describing a message. The SVID doesn't suggest any * particular name for this structure. There is a reference in the @@ -66,6 +125,7 @@ long mtype; /* message type (+ve integer) */ char mtext[1]; /* message body */ }; +#endif #ifdef _KERNEL @@ -92,15 +152,18 @@ #ifndef _KERNEL -#include - __BEGIN_DECLS -int msgsys(int, ...); int msgctl(int, int, struct msqid_ds *); int msgget(key_t, int); +/* XXX return value should be ssize_t. */ +int msgrcv(int, void *, size_t, long, int); +/* XXX second parameter missing const type-qualifier. */ int msgsnd(int, void *, size_t, int); -int msgrcv(int, void*, size_t, long, int); +#if __BSD_VISIBLE +int msgsys(int, ...); +#endif __END_DECLS + #endif #endif /* !_SYS_MSG_H_ */ Index: sys/syscall.h =================================================================== RCS file: /work/repo/src/sys/sys/syscall.h,v retrieving revision 1.121 diff -u -r1.121 syscall.h --- sys/syscall.h 10 Oct 2002 04:08:11 -0000 1.121 +++ sys/syscall.h 16 Oct 2002 20:58:37 -0000 @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/sys/syscall.h,v 1.121 2002/10/10 04:08:11 rwatson Exp $ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.128 2002/10/10 04:02:49 rwatson Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.129 2002/10/15 01:36:45 peter Exp */ #define SYS_syscall 0 @@ -193,10 +193,10 @@ #define SYS_futimes 206 #define SYS_getpgid 207 #define SYS_poll 209 -#define SYS___semctl 220 +#define SYS___osemctl 220 #define SYS_semget 221 #define SYS_semop 222 -#define SYS_msgctl 224 +#define SYS_omsgctl 224 #define SYS_msgget 225 #define SYS_msgsnd 226 #define SYS_msgrcv 227 @@ -320,4 +320,6 @@ #define SYS_extattr_set_link 412 #define SYS_extattr_get_link 413 #define SYS_extattr_delete_link 414 -#define SYS_MAXSYSCALL 415 +#define SYS_msgctl 415 +#define SYS___semctl 416 +#define SYS_MAXSYSCALL 417 Index: sys/syscall.mk =================================================================== RCS file: /work/repo/src/sys/sys/syscall.mk,v retrieving revision 1.76 diff -u -r1.76 syscall.mk --- sys/syscall.mk 10 Oct 2002 04:08:11 -0000 1.76 +++ sys/syscall.mk 16 Oct 2002 20:58:37 -0000 @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. -# $FreeBSD: src/sys/sys/syscall.mk,v 1.76 2002/10/10 04:08:11 rwatson Exp $ -# created from FreeBSD: src/sys/kern/syscalls.master,v 1.128 2002/10/10 04:02:49 rwatson Exp +# $FreeBSD$ +# created from FreeBSD: src/sys/kern/syscalls.master,v 1.129 2002/10/15 01:36:45 peter Exp MIASM = \ syscall.o \ exit.o \ @@ -146,10 +146,10 @@ futimes.o \ getpgid.o \ poll.o \ - __semctl.o \ + __osemctl.o \ semget.o \ semop.o \ - msgctl.o \ + omsgctl.o \ msgget.o \ msgsnd.o \ msgrcv.o \ @@ -268,4 +268,6 @@ ksem_destroy.o \ extattr_set_link.o \ extattr_get_link.o \ - extattr_delete_link.o + extattr_delete_link.o \ + msgctl.o \ + __semctl.o Index: sys/sysproto.h =================================================================== RCS file: /work/repo/src/sys/sys/sysproto.h,v retrieving revision 1.114 diff -u -r1.114 sysproto.h --- sys/sysproto.h 10 Oct 2002 04:08:11 -0000 1.114 +++ sys/sysproto.h 16 Oct 2002 20:58:37 -0000 @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/sys/sysproto.h,v 1.114 2002/10/10 04:08:11 rwatson Exp $ - * created from FreeBSD: src/sys/kern/syscalls.master,v 1.128 2002/10/10 04:02:49 rwatson Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/kern/syscalls.master,v 1.129 2002/10/15 01:36:45 peter Exp */ #ifndef _SYS_SYSPROTO_H_ @@ -659,11 +659,11 @@ char nfds_l_[PADL_(u_int)]; u_int nfds; char nfds_r_[PADR_(u_int)]; char timeout_l_[PADL_(int)]; int timeout; char timeout_r_[PADR_(int)]; }; -struct __semctl_args { +struct __osemctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char arg_l_[PADL_(union semun *)]; union semun * arg; char arg_r_[PADR_(union semun *)]; + char arg_l_[PADL_(union osemun *)]; union osemun * arg; char arg_r_[PADR_(union osemun *)]; }; struct semget_args { char key_l_[PADL_(key_t)]; key_t key; char key_r_[PADR_(key_t)]; @@ -675,10 +675,10 @@ char sops_l_[PADL_(struct sembuf *)]; struct sembuf * sops; char sops_r_[PADR_(struct sembuf *)]; char nsops_l_[PADL_(u_int)]; u_int nsops; char nsops_r_[PADR_(u_int)]; }; -struct msgctl_args { +struct omsgctl_args { char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; - char buf_l_[PADL_(struct msqid_ds *)]; struct msqid_ds * buf; char buf_r_[PADR_(struct msqid_ds *)]; + char buf_l_[PADL_(struct omsqid_ds *)]; struct omsqid_ds * buf; char buf_r_[PADR_(struct omsqid_ds *)]; }; struct msgget_args { char key_l_[PADL_(key_t)]; key_t key; char key_r_[PADR_(key_t)]; @@ -1176,6 +1176,17 @@ char attrnamespace_l_[PADL_(int)]; int attrnamespace; char attrnamespace_r_[PADR_(int)]; char attrname_l_[PADL_(const char *)]; const char * attrname; char attrname_r_[PADR_(const char *)]; }; +struct msgctl_args { + char msqid_l_[PADL_(int)]; int msqid; char msqid_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char buf_l_[PADL_(struct msqid_ds *)]; struct msqid_ds * buf; char buf_r_[PADR_(struct msqid_ds *)]; +}; +struct __semctl_args { + char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; + char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char arg_l_[PADL_(union semun *)]; union semun * arg; char arg_r_[PADR_(union semun *)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_exit(struct thread *, struct sys_exit_args *); int fork(struct thread *, struct fork_args *); @@ -1319,10 +1330,10 @@ int getpgid(struct thread *, struct getpgid_args *); int poll(struct thread *, struct poll_args *); int lkmnosys(struct thread *, struct nosys_args *); -int __semctl(struct thread *, struct __semctl_args *); +int __osemctl(struct thread *, struct __osemctl_args *); int semget(struct thread *, struct semget_args *); int semop(struct thread *, struct semop_args *); -int msgctl(struct thread *, struct msgctl_args *); +int omsgctl(struct thread *, struct omsgctl_args *); int msgget(struct thread *, struct msgget_args *); int msgsnd(struct thread *, struct msgsnd_args *); int msgrcv(struct thread *, struct msgrcv_args *); @@ -1441,6 +1452,8 @@ int extattr_set_link(struct thread *, struct extattr_set_link_args *); int extattr_get_link(struct thread *, struct extattr_get_link_args *); int extattr_delete_link(struct thread *, struct extattr_delete_link_args *); +int msgctl(struct thread *, struct msgctl_args *); +int __semctl(struct thread *, struct __semctl_args *); #ifdef COMPAT_43