Add a nested include of <sys/systm.h> for recently added assertions.
Without this, existing code (such as in drm-kmod) needs to be patched
to add the newly required header.
While here, rewrite the assertions using KASSERT().
Differential D34070
Make <vm/vm_extern.h> more self-contained. jhb on Jan 27 2022, 9:55 PM. Authored by Tags None Referenced Files
Details
Add a nested include of <sys/systm.h> for recently added assertions. While here, rewrite the assertions using KASSERT().
Diff Detail
Event TimelineComment Actions I have no objections, but it was kib, I think, who asked for the invariants in the first place, so get his ok too. Comment Actions sys/systm.h is of course very heavy weight, perhaps too heavy.
Comment Actions Hmm. At first this didn't make sense to me. The "assertions" were written this way so that systm.h wouldn't have to be included, but the prototype for panic() is provided by systm.h. So, this code might as well have used KASSERT all along. Comment Actions It is, but it is already a nested include in <vm/vm_page.h>. I would not mind having a <sys/_assert.h> or the like that contained the bits need for KASSERT and friends (MPASS*, panic() prototype, etc.). |