summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kthread.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
committerjulian <julian@FreeBSD.org>2001-09-12 08:38:13 +0000
commit5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch)
treeb1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/kern/kern_kthread.c
parent83e00d4274950d2b531c24692cd123538ffbddb9 (diff)
downloadFreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip
FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r--sys/kern/kern_kthread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 7e8e702..cb715da 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -81,7 +81,7 @@ kthread_create(void (*func)(void *), void *arg,
if (!proc0.p_stats /* || proc0.p_stats->p_start.tv_sec == 0 */)
panic("kthread_create called too soon");
- error = fork1(&proc0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, &p2);
+ error = fork1(thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, &p2);
if (error)
return error;
@@ -102,14 +102,14 @@ kthread_create(void (*func)(void *), void *arg,
va_end(ap);
/* call the processes' main()... */
- cpu_set_fork_handler(p2, func, arg);
+ cpu_set_fork_handler(&p2->p_thread, func, arg); /* XXXKSE */
/* Delay putting it on the run queue until now. */
mtx_lock_spin(&sched_lock);
p2->p_sflag |= PS_INMEM;
if (!(flags & RFSTOPPED)) {
p2->p_stat = SRUN;
- setrunqueue(p2);
+ setrunqueue(&p2->p_thread); /* XXXKSE */
}
mtx_unlock_spin(&sched_lock);
@@ -125,7 +125,7 @@ kthread_exit(int ecode)
proc_reparent(curproc, initproc);
PROC_UNLOCK(curproc);
sx_xunlock(&proctree_lock);
- exit1(curproc, W_EXITCODE(ecode, 0));
+ exit1(curthread, W_EXITCODE(ecode, 0));
}
/*
OpenPOWER on IntegriCloud