Date: Thu, 25 Sep 2014 12:40:36 -0700 From: "K. Macy" <kmacy@freebsd.org> To: Ian Lepore <ian@freebsd.org> Cc: Davide Italiano <davide@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, Bryan Drewery <bdrewery@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: KASSERT_WARN for asserting malloc(M_WAITOK) not in a non-sleepable thread Message-ID: <CAHM0Q_MGSJWLy-_mSNUayVuPVgVNehi%2BxRoj3-Rkk8QhO1YJCQ@mail.gmail.com> In-Reply-To: <1411669263.66615.249.camel@revolution.hippie.lan> References: <54236CD6.4050807@FreeBSD.org> <CACYV=-Eg69AQ72DOGppPSL7whJVCdcNg-auhBZ771iG7DfPdAw@mail.gmail.com> <5424392D.9030201@FreeBSD.org> <CAJ-Vmok5Xaa6aZvfL1GoW8C==dY47P=vKAEZhu16JhHjV%2BTk9g@mail.gmail.com> <CACYV=-GMpMxEAs-X7umMdYX2Awf3G0La1cUGsXeH9MoX34CdxQ@mail.gmail.com> <1411668571.66615.247.camel@revolution.hippie.lan> <CACYV=-HDVxhQ=CDK7HWuK2t-rsFkW2gKD45NDjC86jQ2wq6v9A@mail.gmail.com> <1411669263.66615.249.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHM0Q_MGSJWLy-_mSNUayVuPVgVNehi%2BxRoj3-Rkk8QhO1YJCQ>
