aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2004-09-05 23:23:58 +0000
committerJulian Elischer <julian@FreeBSD.org>2004-09-05 23:23:58 +0000
commit0fe38d47b7b4aba3eeec851f32925bd24cd526c8 (patch)
tree2139ae7114fbd8a0138ac5868a1a612643c81868 /sys/kern
parentb44e5103c6194cdfd58369ad511c0fd4ddc72d9b (diff)
downloadsrc-0fe38d47b7b4aba3eeec851f32925bd24cd526c8.tar.gz
src-0fe38d47b7b4aba3eeec851f32925bd24cd526c8.zip
slight code cleanup
MFC after: 1 week
Notes
Notes: svn path=/head/; revision=134832
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sched_4bsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 78c3f3d621c5..62cde326ab45 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -746,8 +746,6 @@ sched_switch(struct thread *td, struct thread *newtd)
if ((p->p_flag & P_NOLOAD) == 0)
sched_tdcnt--;
- if (newtd != NULL && (newtd->td_proc->p_flag & P_NOLOAD) == 0)
- sched_tdcnt++;
/*
* The thread we are about to run needs to be counted as if it had been
* added to the run queue and selected.
@@ -756,6 +754,8 @@ sched_switch(struct thread *td, struct thread *newtd)
newtd->td_ksegrp->kg_avail_opennings--;
newtd->td_kse->ke_flags |= KEF_DIDRUN;
TD_SET_RUNNING(newtd);
+ if ((newtd->td_proc->p_flag & P_NOLOAD) == 0)
+ sched_tdcnt++;
}
td->td_lastcpu = td->td_oncpu;
td->td_flags &= ~TDF_NEEDRESCHED;