KASSERT_WARN for asserting malloc(M_WAITOK) not in a non-sleepable thread
K. Macy
kmacy at freebsd.org
Thu Sep 25 19:40:39 UTC 2014
>
>
>
> To me, another "clear and specific semantic" that's associated with the
> word 'assert' in C programming is that the test expression itself is
> automatically printed as part of the diagnostic message. That's not the
> case in the FreeBSD kernel, so I guess we need to rename KASSERT as
> well?
>
Funny you mention that. It's always been a pet peeve of mine that KASSERT
doesn't print the assertion. I always reasoned it away that instead it
prints a string that is supposed to convey the significance of the
expression. So I think it clearly still follows the original intent. Thanks
for the suggestion though.
-K
More information about the freebsd-arch
mailing list