diff options
author | julian <julian@FreeBSD.org> | 2007-10-26 17:03:22 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2007-10-26 17:03:22 +0000 |
commit | b6e413a6333a0c9380b66e7a620f4f87b24b1625 (patch) | |
tree | cc5c6f9096eed1a1a2555ff8e7e94448671975cf | |
parent | 00b0426d314829318193693a78f9f9e8af20813b (diff) | |
download | FreeBSD-src-b6e413a6333a0c9380b66e7a620f4f87b24b1625.zip FreeBSD-src-b6e413a6333a0c9380b66e7a620f4f87b24b1625.tar.gz |
kthread_exit needs no stinkin argument.
-rw-r--r-- | sys/kern/kern_kthread.c | 7 | ||||
-rw-r--r-- | sys/sys/kthread.h | 2 |
2 files changed, 6 insertions, 3 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(); } diff --git a/sys/sys/kthread.h b/sys/sys/kthread.h index 2bd4b33..e4d9c5a 100644 --- a/sys/sys/kthread.h +++ b/sys/sys/kthread.h @@ -68,7 +68,7 @@ int kproc_kthread_add(void (*)(void *), void *, int kthread_add(void (*)(void *), void *, struct proc *, struct thread **, int flags, int pages, const char *, ...) __printflike(7, 8); -void kthread_exit(int) __dead2; +void kthread_exit(void) __dead2; int kthread_resume(struct thread *); void kthread_shutdown(void *, int); void kthread_start(const void *); |