summaryrefslogtreecommitdiffstats
path: root/sys/kern/init_main.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-10-09 02:33:36 +0000
committerjulian <julian@FreeBSD.org>2002-10-09 02:33:36 +0000
commit6b6ba96b60d9de6b157e3a804963854cde6eec5b (patch)
tree93491b956e59fcfe0f873643838ff7944a49abe7 /sys/kern/init_main.c
parent03d461282bdbbe2384e949089d84ae6a3821e7ca (diff)
downloadFreeBSD-src-6b6ba96b60d9de6b157e3a804963854cde6eec5b.zip
FreeBSD-src-6b6ba96b60d9de6b157e3a804963854cde6eec5b.tar.gz
Round out the facilty for a 'bound' thread to loan out its KSE
in specific situations. The owner thread must be blocked, and the borrower can not proceed back to user space with the borrowed KSE. The borrower will return the KSE on the next context switch where teh owner wants it back. This removes a lot of possible race conditions and deadlocks. It is consceivable that the borrower should inherit the priority of the owner too. that's another discussion and would be simple to do. Also, as part of this, the "preallocatd spare thread" is attached to the thread doing a syscall rather than the KSE. This removes the need to lock the scheduler when we want to access it, as it's now "at hand". DDB now shows a lot mor info for threaded proceses though it may need some optimisation to squeeze it all back into 80 chars again. (possible JKH project) Upcalls are now "bound" threads, but "KSE Lending" now means that other completing syscalls can be completed using that KSE before the upcall finally makes it back to the UTS. (getting threads OUT OF THE KERNEL is one of the highest priorities in the KSE system.) The upcall when it happens will present all the completed syscalls to the KSE for selection.
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r--sys/kern/init_main.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 66b58d2..3b97e60 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -374,12 +374,8 @@ proc0_init(void *dummy __unused)
ke->ke_oncpu = 0;
ke->ke_state = KES_THREAD;
ke->ke_thread = td;
- /* proc_linkup puts it in the idle queue, that's not what we want. */
- TAILQ_REMOVE(&kg->kg_iq, ke, ke_kgrlist);
- kg->kg_idle_kses--;
p->p_peers = 0;
p->p_leader = p;
-KASSERT((ke->ke_kgrlist.tqe_next != ke), ("linked to self!"));
bcopy("swapper", p->p_comm, sizeof ("swapper"));
OpenPOWER on IntegriCloud