diff options
author | Kip Macy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
---|---|---|
committer | Kip Macy <kmacy@FreeBSD.org> | 2011-09-16 13:58:51 +0000 |
commit | 8451d0dd78c0a9c0383485b18aba9f081a9db8bb (patch) | |
tree | 2ed8c1cfa9e408c1c66c2cde0823123897e0306e /sys/amd64 | |
parent | 45f3db2122c56592609e50e37e76144ff467db2e (diff) | |
download | src-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/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 4 | ||||
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 1e7b26c081f4..40effb47af56 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -421,7 +421,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) * MPSAFE */ int -sigreturn(td, uap) +sys_sigreturn(td, uap) struct thread *td; struct sigreturn_args /* { const struct __ucontext *sigcntxp; @@ -517,7 +517,7 @@ int freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) { - return sigreturn(td, (struct sigreturn_args *)uap); + return sys_sigreturn(td, (struct sigreturn_args *)uap); } #endif diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index a8ebe7ef1629..abcdd3ebe63e 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -658,7 +658,7 @@ linux_mmap_common(struct thread *td, l_uintptr_t addr, l_size_t len, l_int prot, (void *)bsd_args.addr, (int)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", @@ -677,7 +677,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 @@ -863,7 +863,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 |