diff options
author | kmacy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
commit | 99851f359e6f006b3223bb37dbc49e751ca8c13a (patch) | |
tree | 2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/kern/sysv_msg.c | |
parent | bf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff) | |
download | FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.zip FreeBSD-src-99851f359e6f006b3223bb37dbc49e751ca8c13a.tar.gz |
In order to maximize the re-usability of kernel code in user space this
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.
Reviewed by: rwatson
Approved by: re (bz)
Diffstat (limited to 'sys/kern/sysv_msg.c')
-rw-r--r-- | sys/kern/sysv_msg.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index ffd8580..d58cb7e 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -81,6 +81,7 @@ static int msginit(void); static int msgunload(void); static int sysvmsg_modload(struct module *, int, void *); + #ifdef MSG_DEBUG #define DPRINTF(a) printf a #else @@ -163,7 +164,7 @@ static struct syscall_helper_data msg_syscalls[] = { #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) SYSCALL_INIT_HELPER(msgsys), - SYSCALL_INIT_HELPER(freebsd7_msgctl), + SYSCALL_INIT_HELPER_COMPAT(freebsd7_msgctl), #endif SYSCALL_INIT_LAST }; @@ -180,7 +181,7 @@ static struct syscall_helper_data msg32_syscalls[] = { SYSCALL32_INIT_HELPER(freebsd32_msgctl), SYSCALL32_INIT_HELPER(freebsd32_msgsnd), SYSCALL32_INIT_HELPER(freebsd32_msgrcv), - SYSCALL32_INIT_HELPER(msgget), + SYSCALL32_INIT_HELPER_COMPAT(msgget), SYSCALL32_INIT_HELPER(freebsd32_msgsys), #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) @@ -379,7 +380,7 @@ struct msgctl_args { }; #endif int -msgctl(td, uap) +sys_msgctl(td, uap) struct thread *td; register struct msgctl_args *uap; { @@ -555,8 +556,9 @@ struct msgget_args { int msgflg; }; #endif + int -msgget(td, uap) +sys_msgget(td, uap) struct thread *td; register struct msgget_args *uap; { @@ -1011,7 +1013,7 @@ done2: } int -msgsnd(td, uap) +sys_msgsnd(td, uap) struct thread *td; register struct msgsnd_args *uap; { @@ -1296,7 +1298,7 @@ done2: } int -msgrcv(td, uap) +sys_msgrcv(td, uap) struct thread *td; register struct msgrcv_args *uap; { @@ -1356,7 +1358,7 @@ freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap) return (freebsd32_msgrcv(td, (struct freebsd32_msgrcv_args *)&uap->a2)); default: - return (msgsys(td, (struct msgsys_args *)uap)); + return (sys_msgsys(td, (struct msgsys_args *)uap)); } #else return (nosys(td, NULL)); @@ -1494,15 +1496,15 @@ freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap) /* XXX casting to (sy_call_t *) is bogus, as usual. */ static sy_call_t *msgcalls[] = { - (sy_call_t *)freebsd7_msgctl, (sy_call_t *)msgget, - (sy_call_t *)msgsnd, (sy_call_t *)msgrcv + (sy_call_t *)freebsd7_msgctl, (sy_call_t *)sys_msgget, + (sy_call_t *)sys_msgsnd, (sy_call_t *)sys_msgrcv }; /* * Entry point for all MSG calls. */ int -msgsys(td, uap) +sys_msgsys(td, uap) struct thread *td; /* XXX actually varargs. */ struct msgsys_args /* { |