- Correct the needed headers
- Make the existing example ANSI C. Don't reference a real kernel function whose implementation has changed, it is simple enough to use foo and bar as identifiers
- Add a little bit of introductory text
- Document the widely used MPASS macro in this page
- Drop the cross-reference to config(8)
Details
- Reviewers
markj kib jhb pauamma_gundo.com rpokala - Group Reviewers
manpages - Commits
- rGd85a53128792: KASSERT(9): some updates
rG87132d1dce4b: KASSERT(9): some updates
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 50424 Build 47315: arc lint + arc unit
Event Timeline
share/man/man9/KASSERT.9 | ||
---|---|---|
52 | I think this is a bit unclear: certain non-recoverable errors are handled with an explicit call to panic() since they apply to non-INVARIANTS kernels as well. Maybe it should be more obvious that KASSERT() is optional and only enabled in debugging kernels. | |
84 | Traditionally we use options DIAGNOSTIC for really expensive checks (and in some old code it's used to enable some miscellaneous debug printf()s, but I think that's discouraged now). Maybe it'd be worth mentioning that? |
share/man/man9/KASSERT.9 | ||
---|---|---|
84 | Maybe one way to express this is that assertion conditions should be checkable in constant time. INVARIANTS kernels are allowed to be slow, but they must still be "usable" in some sense. |
I always thought that it was "multi-processor assert" but that doesn't make a ton of sense (maybe it was introduced during the transition to MPSAFE kernels?) and I have no proof. Your name is better.
share/man/man9/KASSERT.9 | ||
---|---|---|
117 | Nice catch! |
share/man/man9/KASSERT.9 | ||
---|---|---|
76 | Something should be said that the panic string is formed by sprintf-ing format and args. | |
95 | ||
98 | This is in fact the worst example of assert. The normal approach for NULL deref checks is to left it to the MMU. Note that we do not have many a != NULL asserts in kernel. bde@ objected esp. loud against them. |