Assert on pg_jobc state.
Stolen from NetBSD.
This commit is contained in:
parent
7ce3a31286
commit
90a08d6cad
@ -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