If a thread was removed from system run queue, kse_assign shouldn't

add it again.
This commit is contained in:
David Xu 2005-07-31 15:11:21 +00:00
parent fe435202da
commit 3d16f519b6

View File

@ -658,6 +658,10 @@ kseq_assign(struct kseq *kseq)
kseq->ksq_group->ksg_load--;
kseq->ksq_load--;
ke->ke_flags &= ~KEF_ASSIGNED;
if (ke->ke_flags & KEF_REMOVED) {
ke->ke_flags &= ~KEF_REMOVED;
continue;
}
ke->ke_flags |= KEF_INTERNAL | KEF_HOLD;
sched_add(ke->ke_thread, SRQ_YIELDING);
}