From d105721a2238d8018e13ee3e8aa7face7a10a2e5 Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 29 Aug 2009 21:53:08 +0000 Subject: Reverse r196640 and r196644 for now. --- sys/kern/kern_thread.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'sys/kern/kern_thread.c') diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 4f3b32c..d47bd8c 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -283,7 +283,7 @@ thread_reap(void) * Allocate a thread. */ struct thread * -thread_alloc(int pages) +thread_alloc(void) { struct thread *td; @@ -291,7 +291,7 @@ thread_alloc(int pages) td = (struct thread *)uma_zalloc(thread_zone, M_WAITOK); KASSERT(td->td_kstack == 0, ("thread_alloc got thread with kstack")); - if (!vm_thread_new(td, pages)) { + if (!vm_thread_new(td, 0)) { uma_zfree(thread_zone, td); return (NULL); } @@ -299,17 +299,6 @@ thread_alloc(int pages) return (td); } -int -thread_alloc_stack(struct thread *td, int pages) -{ - - KASSERT(td->td_kstack == 0, - ("thread_alloc_stack called on a thread with kstack")); - if (!vm_thread_new(td, pages)) - return (0); - cpu_thread_alloc(td); - return (1); -} /* * Deallocate a thread. @@ -323,6 +312,8 @@ 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); if (td->td_kstack != 0) vm_thread_dispose(td); uma_zfree(thread_zone, td); -- cgit v1.1