Many code paths check if the kernel has panicked by accessing
panicstr. Change them all to use a new function-like macro
KERNEL_PANICKED(). This lets us use __predict_false()
consistently, and lets us make further changes to the way the
condition is detected in future.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Here's a better version (the last one had an unintended stray change).
Note: this is a refactoring suggested by mjg, to support his future plans to change the representation of panic state to something small in __read_frequently. The new macro will hide those details from all these call sites, though for now it just does what it was doing before (with the addition of the prediction).
Future note: please upload patches with full context, either using the 'arcanist' tool, or just generate the diff with -U99999 (svn diff -x -U99999)
with this patch applied git grep panicstr still reveals entries in cddl/ code. it should also get modified or the boolean switch is not going to work.
Discussed with Mateusz, he would prefer to write a Coccinelle script to automate this change, so I am abandoning this patch.