From 8451d0dd78c0a9c0383485b18aba9f081a9db8bb Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Fri, 16 Sep 2011 13:58:51 +0000 Subject: 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) --- sys/kern/kern_exit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sys/kern/kern_exit.c') 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; -- cgit v1.2.3