mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
e specific code to revert a partial add ot teh run queue, not
remrunqueue() which can't handle a partially added thread. MFC after: 1 week
This commit is contained in:
parent
15c37be013
commit
9da3e923f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135291
@ -536,8 +536,16 @@ maybe_preempt(struct thread *td)
|
||||
/*
|
||||
* 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);
|
||||
|
Loading…
Reference in New Issue
Block a user