diff options
Diffstat (limited to 'sys/kern')
-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 aff0fe6..cb231c8 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -254,7 +254,10 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p, p = &proc0; oldtd = &thread0; } else { - oldtd = FIRST_THREAD_IN_PROC(p); + if (p == &proc0) + oldtd = &thread0; + else + oldtd = FIRST_THREAD_IN_PROC(p); } /* Initialize our td */ @@ -315,7 +318,7 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p, } void -kthread_exit(int ecode) +kthread_exit(void) { thread_exit(); } |