aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sysv_sem.c
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
committerKip Macy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
commit8451d0dd78c0a9c0383485b18aba9f081a9db8bb (patch)
tree2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/kern/sysv_sem.c
parent45f3db2122c56592609e50e37e76144ff467db2e (diff)
downloadsrc-8451d0dd78c0a9c0383485b18aba9f081a9db8bb.tar.gz
src-8451d0dd78c0a9c0383485b18aba9f081a9db8bb.zip
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)
Notes
Notes: svn path=/head/; revision=225617
Diffstat (limited to 'sys/kern/sysv_sem.c')
-rw-r--r--sys/kern/sysv_sem.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index 4a4c4790ddec..f9ff2170dc32 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -218,7 +218,7 @@ static struct syscall_helper_data sem_syscalls[] = {
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
SYSCALL_INIT_HELPER(semsys),
- SYSCALL_INIT_HELPER(freebsd7___semctl),
+ SYSCALL_INIT_HELPER_COMPAT(freebsd7___semctl),
#endif
SYSCALL_INIT_LAST
};
@@ -233,8 +233,8 @@ static struct syscall_helper_data sem_syscalls[] = {
static struct syscall_helper_data sem32_syscalls[] = {
SYSCALL32_INIT_HELPER(freebsd32_semctl),
- SYSCALL32_INIT_HELPER(semget),
- SYSCALL32_INIT_HELPER(semop),
+ SYSCALL32_INIT_HELPER_COMPAT(semget),
+ SYSCALL32_INIT_HELPER_COMPAT(semop),
SYSCALL32_INIT_HELPER(freebsd32_semsys),
#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7)
@@ -518,7 +518,7 @@ struct __semctl_args {
};
#endif
int
-__semctl(struct thread *td, struct __semctl_args *uap)
+sys___semctl(struct thread *td, struct __semctl_args *uap)
{
struct semid_ds dsbuf;
union semun arg, semun;
@@ -856,7 +856,7 @@ struct semget_args {
};
#endif
int
-semget(struct thread *td, struct semget_args *uap)
+sys_semget(struct thread *td, struct semget_args *uap)
{
int semid, error = 0;
int key = uap->key;
@@ -980,7 +980,7 @@ struct semop_args {
};
#endif
int
-semop(struct thread *td, struct semop_args *uap)
+sys_semop(struct thread *td, struct semop_args *uap)
{
#define SMALL_SOPS 8
struct sembuf small_sops[SMALL_SOPS];
@@ -1382,15 +1382,15 @@ sysctl_sema(SYSCTL_HANDLER_ARGS)
/* XXX casting to (sy_call_t *) is bogus, as usual. */
static sy_call_t *semcalls[] = {
- (sy_call_t *)freebsd7___semctl, (sy_call_t *)semget,
- (sy_call_t *)semop
+ (sy_call_t *)freebsd7___semctl, (sy_call_t *)sys_semget,
+ (sy_call_t *)sys_semop
};
/*
* Entry point for all SEM calls.
*/
int
-semsys(td, uap)
+sys_semsys(td, uap)
struct thread *td;
/* XXX actually varargs. */
struct semsys_args /* {
@@ -1510,7 +1510,7 @@ freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap)
return (freebsd7_freebsd32_semctl(td,
(struct freebsd7_freebsd32_semctl_args *)&uap->a2));
default:
- return (semsys(td, (struct semsys_args *)uap));
+ return (sys_semsys(td, (struct semsys_args *)uap));
}
#else
return (nosys(td, NULL));