This ensures the structure sizes are validated for architectures that
do not build a kernel.
Details
- Reviewers
kib
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 78894 Build 75777: arc lint + arc unit
Event Timeline
I like this, but I have a small request. I am curious if you agree with it.
Can we have a separate source file in libprocstat which only consists of assertions? This is from my experience with maintaining the asserts in kern_thread.c, where to get past compilation I have to fix the layout constants first, which was a secondary to get the code compiled.
It is less important for libprocstat since kinfo must not change often, but IMO it is worth it by being able to temporary remove the assert file from the compilation.
Anyway I am fine with the change as is as well.
Mmm, I would not mind that. For the kernel I generally can find some other object file, yes, though guessing which one is already built can be annoying. :)
One can always comment out the assertion just as easily as commenting out the file FWIW. While starting down this road, it occurred to me that it might not be obvious which assertions are needed if they are in a dedicated file. I tried to put them currently next to each use so it will hopefully be more obvious in the future when new assertions are added or if any can be removed if the corresponding code is removed. For that reason, I think I prefer to leave this as-is.