Commit the better version that I had a while ago. This has only one

reference to curthread.  (#define curproc (curthread->td_proc)).
This commit is contained in:
Peter Wemm 2001-11-12 08:53:34 +00:00
parent 5b1927bc01
commit 658c434d90
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86293

View File

@ -119,14 +119,17 @@ kthread_create(void (*func)(void *), void *arg,
void
kthread_exit(int ecode)
{
struct proc *p = curproc;
struct thread *td;
struct proc *p;
td = curthread;
p = td->td_proc;
sx_xlock(&proctree_lock);
PROC_LOCK(p);
proc_reparent(p, initproc);
PROC_UNLOCK(p);
sx_xunlock(&proctree_lock);
exit1(curthread, W_EXITCODE(ecode, 0));
exit1(td, W_EXITCODE(ecode, 0));
}
/*