With an intent of being used by default instead of KASSERT.
3 variants are provided, depending on the args passed by the caller.
panic: condition 1 == 16 false at fildesc_drvinit (kern_descrip.c:4391): test
KPASS2(1 == 16, "test");
KASSERT(_BLOCKCOUNT_WAITERS(old), ("%s: no waiters on %p", __func__, bc));
could be rewritten as:
KPASS3(_BLOCKCOUNT_WAITERS(old), "no waiters on %p", bc);
I think this saves a lot of retyping and in general is more pleasant to use.
Note the short name. This is a clang extension which can be worked around for gcc, but I'm not doing it (gcc instead prints the full path).
Note this still does not provide anything which would automatically print passed values (in the lines of KPASS_VAL(foo, <, bar) performing foo < bar and printing both on failure along with the stringified expression.). I think adding functionality like this is a separate effort.
MPASS macros can be redefined on top of this to avoid a tree-wide sweep. Note the M thing apparently came from mutexes because the code for some reason was put there despite being really generic.