Page MenuHomeFreeBSD

Move MPASS() macros to systm.h.
ClosedPublic

Authored by glebius on Feb 12 2020, 11:03 PM.
Tags
None
Referenced Files
F132465792: D23656.id68224.diff
Fri, Oct 17, 4:12 AM
F132465789: D23656.id.diff
Fri, Oct 17, 4:12 AM
F132465787: D23656.id68241.diff
Fri, Oct 17, 4:12 AM
F132465782: D23656.id72830.diff
Fri, Oct 17, 4:12 AM
F132419885: D23656.diff
Thu, Oct 16, 7:02 PM
Unknown Object (File)
Fri, Oct 10, 6:16 AM
Unknown Object (File)
Sat, Oct 4, 2:03 AM
Unknown Object (File)
Fri, Oct 3, 7:16 PM
Subscribers

Details

Summary

They are widely used all over the kernel and aren't contained only to the locking code.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

does tinderbox build?

This revision is now accepted and ready to land.Feb 13 2020, 5:07 AM

looks like this is guarded by _KERNEL in the original header, we should stick to it just in case in the new one

In D23656#519337, @mjg wrote:

looks like this is guarded by _KERNEL in the original header, we should stick to it just in case in the new one

Makes sense. I will update.

This revision now requires review to proceed.Feb 13 2020, 5:48 AM

no, keep it grouped with the rest for consistency but #if defined(_KERNEL) around it

In D23656#519345, @mjg wrote:

no, keep it grouped with the rest for consistency but #if defined(_KERNEL) around it

Well, down below are still collection of assertions. I'd rather pull down KASSERT() definitions under _KERNEL. However, that would require additional tinderbox build.

This revision is now accepted and ready to land.Feb 13 2020, 6:10 AM
sys/sys/systm.h
148 ↗(On Diff #68241)

I do not understand, from the discussion above you all agreed to have the macros under _KERNEL, but there it is not ?

sys/sys/systm.h
148 ↗(On Diff #68241)

It is. The ifdef is above at line 134.

sys/sys/systm.h
148 ↗(On Diff #68241)

But isn't endif at line 138 ends its scope ?

sys/sys/systm.h
148 ↗(On Diff #68241)

You are damn right. So looks like all other kernel related asserts in systm.h aren't covered by _KERNEL. Then I'd suggest to proceed as is, with original patch, where MPASSes were right after KASSERT definition.

Then with a new patch tested with separate tinderbox build I will push all kernel related assertions under _KERNEL, all at once.

kib added inline comments.
sys/sys/systm.h
148 ↗(On Diff #68241)

ok