diff options
author | peter <peter@FreeBSD.org> | 2001-11-12 08:53:34 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-11-12 08:53:34 +0000 |
commit | 63c937a8f7fdfb8319a7f2c93bf0d469457dc77b (patch) | |
tree | a99c5e30aca2a9a6bcac8aed89279b9680640cee /sys | |
parent | 9a4e2a07a8235ef5d01865b7802dd8149eeb6058 (diff) | |
download | FreeBSD-src-63c937a8f7fdfb8319a7f2c93bf0d469457dc77b.zip FreeBSD-src-63c937a8f7fdfb8319a7f2c93bf0d469457dc77b.tar.gz |
Commit the better version that I had a while ago. This has only one
reference to curthread. (#define curproc (curthread->td_proc)).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_kthread.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index becfb76..b5ed8d4 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -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)); } /* |