summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kthread.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-08-29 21:53:08 +0000
committerkib <kib@FreeBSD.org>2009-08-29 21:53:08 +0000
commitd105721a2238d8018e13ee3e8aa7face7a10a2e5 (patch)
treeac1b3c153ca3423ba66347e6a8bb50406e26038c /sys/kern/kern_kthread.c
parent7e88789784ae0e3126509bacd97d46cc20dbf6f8 (diff)
downloadFreeBSD-src-d105721a2238d8018e13ee3e8aa7face7a10a2e5.zip
FreeBSD-src-d105721a2238d8018e13ee3e8aa7face7a10a2e5.tar.gz
Reverse r196640 and r196644 for now.
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r--sys/kern/kern_kthread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 3c5248e..1092832 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -256,7 +256,7 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p,
}
/* Initialize our new td */
- newtd = thread_alloc(pages);
+ newtd = thread_alloc();
if (newtd == NULL)
return (ENOMEM);
@@ -282,6 +282,9 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p,
newtd->td_pflags |= TDP_KTHREAD;
newtd->td_ucred = crhold(p->p_ucred);
+ /* Allocate and switch to an alternate kstack if specified. */
+ if (pages != 0)
+ vm_thread_new_altkstack(newtd, pages);
/* this code almost the same as create_thread() in kern_thr.c */
PROC_LOCK(p);
OpenPOWER on IntegriCloud