Page MenuHomeFreeBSD

Move MPASS() macros to systm.h.
AcceptedPublic

Authored by glebius on Wed, Feb 12, 11:03 PM.

Details

Reviewers
kib
mjg
Summary

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

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 29341
Build 27242: arc lint + arc unit

Event Timeline

glebius created this revision.Wed, Feb 12, 11:03 PM
mjg accepted this revision.Thu, Feb 13, 5:07 AM

does tinderbox build?

This revision is now accepted and ready to land.Thu, Feb 13, 5:07 AM
mjg added a comment.Thu, Feb 13, 5:09 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.

glebius updated this revision to Diff 68241.Thu, Feb 13, 5:48 AM

Shift down under _KERNEL.

This revision now requires review to proceed.Thu, Feb 13, 5:48 AM
mjg added a comment.Thu, Feb 13, 5:53 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.

mjg accepted this revision.Thu, Feb 13, 6:10 AM
This revision is now accepted and ready to land.Thu, Feb 13, 6:10 AM
kib added inline comments.Thu, Feb 13, 11:25 AM
sys/sys/systm.h
148

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

glebius added inline comments.Thu, Feb 13, 4:01 PM
sys/sys/systm.h
148

It is. The ifdef is above at line 134.

kib added inline comments.Thu, Feb 13, 4:34 PM
sys/sys/systm.h
148

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

glebius added inline comments.Thu, Feb 13, 6:13 PM
sys/sys/systm.h
148

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 accepted this revision.Thu, Feb 13, 6:24 PM
kib added inline comments.
sys/sys/systm.h
148

ok