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/kern/kern_exit.c | |
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/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e5d60942f7c0..9be54de163dd 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -104,7 +104,7 @@ void (*nlminfo_release_p)(struct proc *p); * exit -- death of process. */ void -sys_exit(struct thread *td, struct sys_exit_args *uap) +sys_sys_exit(struct thread *td, struct sys_exit_args *uap) { exit1(td, W_EXITCODE(uap->rval, 0)); @@ -224,7 +224,7 @@ exit1(struct thread *td, int rv) q = p->p_peers; while (q != NULL) { PROC_LOCK(q); - psignal(q, SIGKILL); + kern_psignal(q, SIGKILL); PROC_UNLOCK(q); q = q->p_peers; } @@ -421,7 +421,7 @@ exit1(struct thread *td, int rv) q->p_flag &= ~(P_TRACED | P_STOPPED_TRACE); FOREACH_THREAD_IN_PROC(q, temp) temp->td_dbgflags &= ~TDB_SUSPEND; - psignal(q, SIGKILL); + kern_psignal(q, SIGKILL); } PROC_UNLOCK(q); } @@ -501,12 +501,12 @@ exit1(struct thread *td, int rv) mtx_unlock(&p->p_pptr->p_sigacts->ps_mtx); if (p->p_pptr == initproc) - psignal(p->p_pptr, SIGCHLD); + kern_psignal(p->p_pptr, SIGCHLD); else if (p->p_sigparent != 0) { if (p->p_sigparent == SIGCHLD) childproc_exited(p); else /* LINUX thread */ - psignal(p->p_pptr, p->p_sigparent); + kern_psignal(p->p_pptr, p->p_sigparent); } #ifdef PROCDESC } else @@ -568,7 +568,7 @@ struct abort2_args { #endif int -abort2(struct thread *td, struct abort2_args *uap) +sys_abort2(struct thread *td, struct abort2_args *uap) { struct proc *p = td->td_proc; struct sbuf *sb; @@ -656,7 +656,7 @@ owait(struct thread *td, struct owait_args *uap __unused) * The dirty work is handled by kern_wait(). */ int -wait4(struct thread *td, struct wait_args *uap) +sys_wait4(struct thread *td, struct wait_args *uap) { struct rusage ru, *rup; int error, status; |