summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
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/i386/linux
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/i386/linux')
-rw-r--r--sys/i386/linux/linux_machdep.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index 57756c4..396740a 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -564,7 +564,7 @@ linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot,
(void *)bsd_args.addr, bsd_args.len, bsd_args.prot,
bsd_args.flags, bsd_args.fd, (int)bsd_args.pos);
#endif
- error = mmap(td, &bsd_args);
+ error = sys_mmap(td, &bsd_args);
#ifdef DEBUG
if (ldebug(mmap))
printf("-> %s() return: 0x%x (0x%08x)\n",
@@ -583,7 +583,7 @@ linux_mprotect(struct thread *td, struct linux_mprotect_args *uap)
bsd_args.prot = uap->prot;
if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
bsd_args.prot |= PROT_READ | PROT_EXEC;
- return (mprotect(td, &bsd_args));
+ return (sys_mprotect(td, &bsd_args));
}
int
@@ -844,7 +844,7 @@ linux_ftruncate64(struct thread *td, struct linux_ftruncate64_args *args)
sa.fd = args->fd;
sa.length = args->length;
- return ftruncate(td, &sa);
+ return sys_ftruncate(td, &sa);
}
int
@@ -1000,31 +1000,31 @@ linux_get_thread_area(struct thread *td, struct linux_get_thread_area_args *args
int
linux_timer_create(struct thread *td, struct linux_timer_create_args *args)
{
- return ktimer_create(td, (struct ktimer_create_args *) args);
+ return sys_ktimer_create(td, (struct ktimer_create_args *) args);
}
int
linux_timer_settime(struct thread *td, struct linux_timer_settime_args *args)
{
- return ktimer_settime(td, (struct ktimer_settime_args *) args);
+ return sys_ktimer_settime(td, (struct ktimer_settime_args *) args);
}
int
linux_timer_gettime(struct thread *td, struct linux_timer_gettime_args *args)
{
- return ktimer_gettime(td, (struct ktimer_gettime_args *) args);
+ return sys_ktimer_gettime(td, (struct ktimer_gettime_args *) args);
}
int
linux_timer_getoverrun(struct thread *td, struct linux_timer_getoverrun_args *args)
{
- return ktimer_getoverrun(td, (struct ktimer_getoverrun_args *) args);
+ return sys_ktimer_getoverrun(td, (struct ktimer_getoverrun_args *) args);
}
int
linux_timer_delete(struct thread *td, struct linux_timer_delete_args *args)
{
- return ktimer_delete(td, (struct ktimer_delete_args *) args);
+ return sys_ktimer_delete(td, (struct ktimer_delete_args *) args);
}
/* XXX: this wont work with module - convert it */
@@ -1032,7 +1032,7 @@ int
linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
{
#ifdef P1003_1B_MQUEUE
- return kmq_open(td, (struct kmq_open_args *) args);
+ return sys_kmq_open(td, (struct kmq_open_args *) args);
#else
return (ENOSYS);
#endif
@@ -1042,7 +1042,7 @@ int
linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
{
#ifdef P1003_1B_MQUEUE
- return kmq_unlink(td, (struct kmq_unlink_args *) args);
+ return sys_kmq_unlink(td, (struct kmq_unlink_args *) args);
#else
return (ENOSYS);
#endif
@@ -1052,7 +1052,7 @@ int
linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
{
#ifdef P1003_1B_MQUEUE
- return kmq_timedsend(td, (struct kmq_timedsend_args *) args);
+ return sys_kmq_timedsend(td, (struct kmq_timedsend_args *) args);
#else
return (ENOSYS);
#endif
@@ -1062,7 +1062,7 @@ int
linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
{
#ifdef P1003_1B_MQUEUE
- return kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
+ return sys_kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
#else
return (ENOSYS);
#endif
@@ -1072,7 +1072,7 @@ int
linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
{
#ifdef P1003_1B_MQUEUE
- return kmq_notify(td, (struct kmq_notify_args *) args);
+ return sys_kmq_notify(td, (struct kmq_notify_args *) args);
#else
return (ENOSYS);
#endif
@@ -1082,7 +1082,7 @@ int
linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
{
#ifdef P1003_1B_MQUEUE
- return kmq_setattr(td, (struct kmq_setattr_args *) args);
+ return sys_kmq_setattr(td, (struct kmq_setattr_args *) args);
#else
return (ENOSYS);
#endif
OpenPOWER on IntegriCloud