diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2008-03-02 07:39:22 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2008-03-02 07:39:22 +0000 |
| commit | d7f687fc9b6513875325f8aad4c9a92444984b96 (patch) | |
| tree | 08c6ca461fae4d8b5341e887a545b2d167f50daf /sys/kern/kern_thread.c | |
| parent | 885d51a38a7d27227219d37738b67fd39064ec6a (diff) | |
Notes
Diffstat (limited to 'sys/kern/kern_thread.c')
| -rw-r--r-- | sys/kern/kern_thread.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 6f23b634127f..8d9f75320a4f 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/turnstile.h> #include <sys/ktr.h> #include <sys/umtx.h> +#include <sys/cpuset.h> #include <security/audit/audit.h> @@ -342,7 +343,8 @@ thread_alloc(void) void thread_free(struct thread *td) { - + cpuset_rel(td->td_cpuset); + td->td_cpuset = NULL; cpu_thread_free(td); if (td->td_altkstack != 0) vm_thread_dispose_altkstack(td); @@ -527,6 +529,8 @@ thread_wait(struct proc *p) /* Wait for any remaining threads to exit cpu_throw(). */ while (p->p_exitthreads) sched_relinquish(curthread); + cpuset_rel(td->td_cpuset); + td->td_cpuset = NULL; cpu_thread_clean(td); crfree(td->td_ucred); thread_reap(); /* check for zombie threads etc. */ |
