- Catch up to proc flag changes.
- Assert sched_lock is held in proc_compare.
This commit is contained in:
parent
3897ca7c61
commit
168666be74
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71568
@ -2307,6 +2307,7 @@ proc_compare(p1, p2)
|
||||
register struct proc *p1, *p2;
|
||||
{
|
||||
|
||||
mtx_assert(&sched_lock, MA_OWNED);
|
||||
if (p1 == NULL)
|
||||
return (1);
|
||||
|
||||
@ -2350,9 +2351,9 @@ proc_compare(p1, p2)
|
||||
/*
|
||||
* favor one sleeping in a non-interruptible sleep
|
||||
*/
|
||||
if (p1->p_flag & P_SINTR && (p2->p_flag & P_SINTR) == 0)
|
||||
if (p1->p_sflag & PS_SINTR && (p2->p_sflag & PS_SINTR) == 0)
|
||||
return (1);
|
||||
if (p2->p_flag & P_SINTR && (p1->p_flag & P_SINTR) == 0)
|
||||
if (p2->p_sflag & PS_SINTR && (p1->p_sflag & PS_SINTR) == 0)
|
||||
return (0);
|
||||
return (p2->p_pid > p1->p_pid); /* tie - return highest pid */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user