Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2014 11:31:41 -0700
From:      "K. Macy" <kmacy@freebsd.org>
To:        Justin Hibbits <jhibbits@freebsd.org>
Cc:        Davide Italiano <davide@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, Bryan Drewery <bdrewery@freebsd.org>, Ian Lepore <ian@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_NDQrABA2j7%2BDj6TUfyqBatq6i3k1OPuTPfvF3eeQH7YQ@mail.gmail.com>
In-Reply-To: <CAHSQbTCwwxvudijaanvUohF9Em_%2B2%2Bac-%2B1j0OEcNFY=vEx2gA@mail.gmail.com>
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> <CAHSQbTCwwxvudijaanvUohF9Em_%2B2%2Bac-%2B1j0OEcNFY=vEx2gA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>
>
> I like my bikeshed a nice royal blue.  At a previous job we used
> ASSERT and VERIFY macros.  VERIFY was comparable to this (warn if
> condition not met, don't panic), so how about KVERIFY() (I'll also
> support KWARN, but I think KVERIFY() conveys a better message by
> name).
>

Assert has a long established meaning in C that if a condition is not met,
abort _now_. So his reservations about KASSERT_WARN aren't just spouting
off. And while bikesheds are in fact all too prevalent your flippant
comment about the color of the bikeshed is rather condescending and does
not contribute positively to the tone of the discussion.

Either of your suggestions is fine and a clear improvement over the initial
name. KVERIFY would have clearer implications that this isn't a simple log
message.

Thanks for presenting these alternatives.
-K



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHM0Q_NDQrABA2j7%2BDj6TUfyqBatq6i3k1OPuTPfvF3eeQH7YQ>