Assert on pg_jobc state.
Stolen from NetBSD.
This commit is contained in:
parent
7ce3a31286
commit
90a08d6cad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361967
@ -751,9 +751,11 @@ pgadjustjobc(struct pgrp *pgrp, int entering)
|
||||
{
|
||||
|
||||
PGRP_LOCK(pgrp);
|
||||
if (entering)
|
||||
if (entering) {
|
||||
MPASS(pgrp->pg_jobc >= 0);
|
||||
pgrp->pg_jobc++;
|
||||
else {
|
||||
} else {
|
||||
MPASS(pgrp->pg_jobc > 0);
|
||||
--pgrp->pg_jobc;
|
||||
if (pgrp->pg_jobc == 0)
|
||||
orphanpg(pgrp);
|
||||
|
Loading…
Reference in New Issue
Block a user