Date: Sat, 24 Apr 2004 14:18:45 -0700 (PDT) From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 51666 for review Message-ID: <200404242118.i3OLIjei018187@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=51666 Change 51666 by julian@julian_jules1 on 2004/04/24 14:18:13 flush changes hanging around.. change a function name to better describe it. Affected files ... .. //depot/projects/nsched/sys/kern/sched_4bsd.c#5 edit Differences ... ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#5 (text+ko) ==== @@ -163,7 +163,7 @@ void kse_stash(struct kse *ke); void kse_reassign(struct kse *ke); void sched_fork_kse(struct thread *parenttd, struct kse *newke); -void sched_exit_kse(struct proc *parent, struct thread *childtd); +void sched_unrun_kse(struct proc *parent, struct thread *childtd); #define KTR_4BSD 0x0 @@ -651,6 +651,8 @@ { sched_exit_ksegrp(parent, childtd); sched_exit_thread(parent, childtd); + if (childtd->td_kse) + sched_unrun_kse(parent, childtd); } /* This PROBABLY gives the estcpu to the wrong kseg */ @@ -670,8 +672,6 @@ { if ((childtd->td_proc->p_flag & P_NOLOAD) == 0) sched_tdcnt--; - if (childtd->td_kse) - sched_exit_kse(parent, childtd); } void @@ -1098,7 +1098,7 @@ ke->ke_state = KES_UNQUEUED; ke->ke_thread = NULL; kse_unlink(ke); - sched_exit_kse(td->td_proc->p_pptr, td); + sched_unrun_kse(td->td_proc->p_pptr, td); td->td_kse = NULL; td->td_last_kse = NULL; } @@ -1266,15 +1266,19 @@ } } +/* + * The current KSE is being dumped. Clear stuff and + * look to see if another thread needs us. + */ void -sched_exit_kse(struct proc *parent, struct thread *childtd) +sched_unrun_kse(struct proc *parent, struct thread *childtd) { struct ksegrp *kg; struct kse *ke; kg = childtd->td_ksegrp; ke = childtd->td_kse; - KASSERT((ke),("unexpected null KSE ptr in sched_exit_kse()")); + KASSERT((ke),("unexpected null KSE ptr in sched_unrun_kse()")); ke->ke_state = KES_UNQUEUED; ke->ke_thread = NULL; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404242118.i3OLIjei018187>