diff options
author | julian <julian@FreeBSD.org> | 2004-09-05 23:23:58 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-09-05 23:23:58 +0000 |
commit | daf0815c1de710f7a9de75f195ecc6b317e9d2b9 (patch) | |
tree | 2139ae7114fbd8a0138ac5868a1a612643c81868 | |
parent | dbe0ec28e60e4f5d7a212769da14ee85cd40828d (diff) | |
download | FreeBSD-src-daf0815c1de710f7a9de75f195ecc6b317e9d2b9.zip FreeBSD-src-daf0815c1de710f7a9de75f195ecc6b317e9d2b9.tar.gz |
slight code cleanup
MFC after: 1 week
-rw-r--r-- | sys/kern/sched_4bsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 78c3f3d..62cde32 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; |