aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/sched_ule.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2004-09-16 07:12:59 +0000
committerJulian Elischer <julian@FreeBSD.org>2004-09-16 07:12:59 +0000
commit14f0e2e9bf2529b504c3094971c553cadf813e83 (patch)
treed07e704218909383fd325c02883dbc86dfaeb565 /sys/kern/sched_ule.c
parentf6ddde7cfab6f792eae237acefedeecc738c631a (diff)
downloadsrc-14f0e2e9bf2529b504c3094971c553cadf813e83.tar.gz
src-14f0e2e9bf2529b504c3094971c553cadf813e83.zip
clean up thread runq accounting a bit.
MFC after: 3 days
Notes
Notes: svn path=/head/; revision=135295
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r--sys/kern/sched_ule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index bab2bdec65ea..e248d6d37bf7 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -1773,6 +1773,7 @@ sched_add_internal(struct thread *td, int preemptive)
curthread->td_flags |= TDF_NEEDRESCHED;
if (preemptive && maybe_preempt(td))
return;
+ td->td_ksegrp->kg_avail_opennings--;
ke->ke_ksegrp->kg_runq_threads++;
ke->ke_state = KES_ONRUNQ;
@@ -1800,6 +1801,7 @@ sched_rem(struct thread *td)
("sched_rem: KSE not on run queue"));
ke->ke_state = KES_THREAD;
+ td->td_ksegrp->kg_avail_opennings++;
ke->ke_ksegrp->kg_runq_threads--;
kseq = KSEQ_CPU(ke->ke_cpu);
kseq_runq_rem(kseq, ke);