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/compat/freebsd32/freebsd32_misc.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/compat/freebsd32/freebsd32_misc.c')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 5b6e895..6d28715 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -425,7 +425,7 @@ freebsd32_mmap_partial(struct thread *td, vm_offset_t start, vm_offset_t end, r.buf = (void *) start; r.nbyte = end - start; r.offset = pos; - return (pread(td, &r)); + return (sys_pread(td, &r)); } else { while (start < end) { subyte((void *) start, 0); @@ -500,7 +500,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap) r.buf = (void *) start; r.nbyte = end - start; r.offset = pos; - error = pread(td, &r); + error = sys_pread(td, &r); if (error) return (error); @@ -527,7 +527,7 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap) ap.fd = fd; ap.pos = pos; - return (mmap(td, &ap)); + return (sys_mmap(td, &ap)); } #ifdef COMPAT_FREEBSD6 @@ -1401,7 +1401,7 @@ freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap) ap.buf = uap->buf; ap.nbyte = uap->nbyte; ap.offset = PAIR32TO64(off_t,uap->offset); - return (pread(td, &ap)); + return (sys_pread(td, &ap)); } int @@ -1413,7 +1413,7 @@ freebsd32_pwrite(struct thread *td, struct freebsd32_pwrite_args *uap) ap.buf = uap->buf; ap.nbyte = uap->nbyte; ap.offset = PAIR32TO64(off_t,uap->offset); - return (pwrite(td, &ap)); + return (sys_pwrite(td, &ap)); } #ifdef COMPAT_43 @@ -1425,7 +1425,7 @@ ofreebsd32_lseek(struct thread *td, struct ofreebsd32_lseek_args *uap) nuap.fd = uap->fd; nuap.offset = uap->offset; nuap.whence = uap->whence; - return (lseek(td, &nuap)); + return (sys_lseek(td, &nuap)); } #endif @@ -1439,7 +1439,7 @@ freebsd32_lseek(struct thread *td, struct freebsd32_lseek_args *uap) ap.fd = uap->fd; ap.offset = PAIR32TO64(off_t,uap->offset); ap.whence = uap->whence; - error = lseek(td, &ap); + error = sys_lseek(td, &ap); /* Expand the quad return into two parts for eax and edx */ pos = *(off_t *)(td->td_retval); td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ @@ -1454,7 +1454,7 @@ freebsd32_truncate(struct thread *td, struct freebsd32_truncate_args *uap) ap.path = uap->path; ap.length = PAIR32TO64(off_t,uap->length); - return (truncate(td, &ap)); + return (sys_truncate(td, &ap)); } int @@ -1464,7 +1464,7 @@ freebsd32_ftruncate(struct thread *td, struct freebsd32_ftruncate_args *uap) ap.fd = uap->fd; ap.length = PAIR32TO64(off_t,uap->length); - return (ftruncate(td, &ap)); + return (sys_ftruncate(td, &ap)); } #ifdef COMPAT_43 @@ -1519,7 +1519,7 @@ freebsd6_freebsd32_pread(struct thread *td, struct freebsd6_freebsd32_pread_args ap.buf = uap->buf; ap.nbyte = uap->nbyte; ap.offset = PAIR32TO64(off_t,uap->offset); - return (pread(td, &ap)); + return (sys_pread(td, &ap)); } int @@ -1531,7 +1531,7 @@ freebsd6_freebsd32_pwrite(struct thread *td, struct freebsd6_freebsd32_pwrite_ar ap.buf = uap->buf; ap.nbyte = uap->nbyte; ap.offset = PAIR32TO64(off_t,uap->offset); - return (pwrite(td, &ap)); + return (sys_pwrite(td, &ap)); } int @@ -1544,7 +1544,7 @@ freebsd6_freebsd32_lseek(struct thread *td, struct freebsd6_freebsd32_lseek_args ap.fd = uap->fd; ap.offset = PAIR32TO64(off_t,uap->offset); ap.whence = uap->whence; - error = lseek(td, &ap); + error = sys_lseek(td, &ap); /* Expand the quad return into two parts for eax and edx */ pos = *(off_t *)(td->td_retval); td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ @@ -1559,7 +1559,7 @@ freebsd6_freebsd32_truncate(struct thread *td, struct freebsd6_freebsd32_truncat ap.path = uap->path; ap.length = PAIR32TO64(off_t,uap->length); - return (truncate(td, &ap)); + return (sys_truncate(td, &ap)); } int @@ -1569,7 +1569,7 @@ freebsd6_freebsd32_ftruncate(struct thread *td, struct freebsd6_freebsd32_ftrunc ap.fd = uap->fd; ap.length = PAIR32TO64(off_t,uap->length); - return (ftruncate(td, &ap)); + return (sys_ftruncate(td, &ap)); } #endif /* COMPAT_FREEBSD6 */ @@ -2409,7 +2409,7 @@ freebsd32_cpuset_setid(struct thread *td, ap.id = PAIR32TO64(id_t,uap->id); ap.setid = uap->setid; - return (cpuset_setid(td, &ap)); + return (sys_cpuset_setid(td, &ap)); } int @@ -2423,7 +2423,7 @@ freebsd32_cpuset_getid(struct thread *td, ap.id = PAIR32TO64(id_t,uap->id); ap.setid = uap->setid; - return (cpuset_getid(td, &ap)); + return (sys_cpuset_getid(td, &ap)); } int @@ -2438,7 +2438,7 @@ freebsd32_cpuset_getaffinity(struct thread *td, ap.cpusetsize = uap->cpusetsize; ap.mask = uap->mask; - return (cpuset_getaffinity(td, &ap)); + return (sys_cpuset_getaffinity(td, &ap)); } int @@ -2453,7 +2453,7 @@ freebsd32_cpuset_setaffinity(struct thread *td, ap.cpusetsize = uap->cpusetsize; ap.mask = uap->mask; - return (cpuset_setaffinity(td, &ap)); + return (sys_cpuset_setaffinity(td, &ap)); } int @@ -2813,5 +2813,5 @@ freebsd32_posix_fallocate(struct thread *td, ap.fd = uap->fd; ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); ap.len = (uap->lenlo | ((off_t)uap->lenhi << 32)); - return (posix_fallocate(td, &ap)); + return (sys_posix_fallocate(td, &ap)); } |