Date: Wed, 15 Sep 2004 22:47:35 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 61573 for review Message-ID: <200409152247.i8FMlZrp007961@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=61573 Change 61573 by julian@julian_ref on 2004/09/15 22:46:43 fix backing out of runq addition for preempting threads. Affected files ... .. //depot/projects/nsched/sys/kern/kern_switch.c#32 edit Differences ... ==== //depot/projects/nsched/sys/kern/kern_switch.c#32 (text+ko) ==== @@ -591,8 +591,16 @@ /* * If this is a threaded process we actually ARE on the * ksegrp run queue so take it off that first. + * Also undo any damage done to the last_assigned pointer. + * XXX Fix setrunqueue so this isn't needed */ - remrunqueue(td); /* maybe use a simpler version */ + struct ksegrp *kg; + + kg = td->td_ksegrp; + if (kg->kg_last_assigned == td) + kg->kg_last_assigned = + TAILQ_PREV(td, threadqueue, td_runq); + TAILQ_REMOVE(&kg->kg_runq, td, td_runq); } TD_SET_RUNNING(td);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409152247.i8FMlZrp007961>