summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_sem.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
committerkmacy <kmacy@FreeBSD.org>2011-09-16 13:58:51 +0000
commit99851f359e6f006b3223bb37dbc49e751ca8c13a (patch)
tree2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/kern/uipc_sem.c
parentbf8fedabcd023c90bb2ee4ce0e5d6d8c2b927714 (diff)
downloadFreeBSD-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/uipc_sem.c')
-rw-r--r--sys/kern/uipc_sem.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c
index f77bf3b..c219844 100644
--- a/sys/kern/uipc_sem.c
+++ b/sys/kern/uipc_sem.c
@@ -618,7 +618,7 @@ struct ksem_init_args {
};
#endif
int
-ksem_init(struct thread *td, struct ksem_init_args *uap)
+sys_ksem_init(struct thread *td, struct ksem_init_args *uap)
{
return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value,
@@ -635,7 +635,7 @@ struct ksem_open_args {
};
#endif
int
-ksem_open(struct thread *td, struct ksem_open_args *uap)
+sys_ksem_open(struct thread *td, struct ksem_open_args *uap)
{
DP((">>> ksem_open start, pid=%d\n", (int)td->td_proc->p_pid));
@@ -652,7 +652,7 @@ struct ksem_unlink_args {
};
#endif
int
-ksem_unlink(struct thread *td, struct ksem_unlink_args *uap)
+sys_ksem_unlink(struct thread *td, struct ksem_unlink_args *uap)
{
char *path;
Fnv32_t fnv;
@@ -680,7 +680,7 @@ struct ksem_close_args {
};
#endif
int
-ksem_close(struct thread *td, struct ksem_close_args *uap)
+sys_ksem_close(struct thread *td, struct ksem_close_args *uap)
{
struct ksem *ks;
struct file *fp;
@@ -706,7 +706,7 @@ struct ksem_post_args {
};
#endif
int
-ksem_post(struct thread *td, struct ksem_post_args *uap)
+sys_ksem_post(struct thread *td, struct ksem_post_args *uap)
{
struct file *fp;
struct ksem *ks;
@@ -744,7 +744,7 @@ struct ksem_wait_args {
};
#endif
int
-ksem_wait(struct thread *td, struct ksem_wait_args *uap)
+sys_ksem_wait(struct thread *td, struct ksem_wait_args *uap)
{
return (kern_sem_wait(td, uap->id, 0, NULL));
@@ -757,7 +757,7 @@ struct ksem_timedwait_args {
};
#endif
int
-ksem_timedwait(struct thread *td, struct ksem_timedwait_args *uap)
+sys_ksem_timedwait(struct thread *td, struct ksem_timedwait_args *uap)
{
struct timespec abstime;
struct timespec *ts;
@@ -785,7 +785,7 @@ struct ksem_trywait_args {
};
#endif
int
-ksem_trywait(struct thread *td, struct ksem_trywait_args *uap)
+sys_ksem_trywait(struct thread *td, struct ksem_trywait_args *uap)
{
return (kern_sem_wait(td, uap->id, 1, NULL));
@@ -862,7 +862,7 @@ struct ksem_getvalue_args {
};
#endif
int
-ksem_getvalue(struct thread *td, struct ksem_getvalue_args *uap)
+sys_ksem_getvalue(struct thread *td, struct ksem_getvalue_args *uap)
{
struct file *fp;
struct ksem *ks;
@@ -896,7 +896,7 @@ struct ksem_destroy_args {
};
#endif
int
-ksem_destroy(struct thread *td, struct ksem_destroy_args *uap)
+sys_ksem_destroy(struct thread *td, struct ksem_destroy_args *uap)
{
struct file *fp;
struct ksem *ks;
@@ -994,14 +994,14 @@ freebsd32_ksem_timedwait(struct thread *td,
static struct syscall_helper_data ksem32_syscalls[] = {
SYSCALL32_INIT_HELPER(freebsd32_ksem_init),
SYSCALL32_INIT_HELPER(freebsd32_ksem_open),
- SYSCALL32_INIT_HELPER(ksem_unlink),
- SYSCALL32_INIT_HELPER(ksem_close),
- SYSCALL32_INIT_HELPER(ksem_post),
- SYSCALL32_INIT_HELPER(ksem_wait),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_unlink),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_close),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_post),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_wait),
SYSCALL32_INIT_HELPER(freebsd32_ksem_timedwait),
- SYSCALL32_INIT_HELPER(ksem_trywait),
- SYSCALL32_INIT_HELPER(ksem_getvalue),
- SYSCALL32_INIT_HELPER(ksem_destroy),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_trywait),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_getvalue),
+ SYSCALL32_INIT_HELPER_COMPAT(ksem_destroy),
SYSCALL_INIT_LAST
};
#endif
OpenPOWER on IntegriCloud