Date: Thu, 7 Jul 2022 11:07:02 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Kristof Provost <kp@freebsd.org> Cc: Warner Losh <imp@bsdimp.com>, Ryan Stone <rysto32@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: buildkernel is broken Message-ID: <YscgxsiiF0eCdKka@troutmask.apl.washington.edu> In-Reply-To: <4FE3FF3B-9F2C-41BF-9F96-B8036055A9F6@FreeBSD.org> References: <YsZptHF8tSttpTVy@troutmask.apl.washington.edu> <CAFMmRNz_FjszHNx92vbV9wezBHwT222w2PKO9WwN1zpWciRo5A@mail.gmail.com> <YsbtBZwfBMmltllg@troutmask.apl.washington.edu> <CAFMmRNyWYGD1UoyqMvTnyCnytKFrH9rPcM01Q2YMxhOQkWNd=A@mail.gmail.com> <Ysbyl28nKKlr5Kr2@troutmask.apl.washington.edu> <CAFMmRNyCDzMAcR6dfUAo53399YyaB%2B70ME20oBnOdLAqT-SBEQ@mail.gmail.com> <YscLgscTJlp6I4gf@troutmask.apl.washington.edu> <CANCZdfoA2OGPOMT%2BeD4cjDnQ5DvYeG1Z2iXv-okDB3o_KCSjng@mail.gmail.com> <YscRLGLeeN941jGa@troutmask.apl.washington.edu> <4FE3FF3B-9F2C-41BF-9F96-B8036055A9F6@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 07, 2022 at 07:59:29PM +0200, Kristof Provost wrote: > On 7 Jul 2022, at 19:00, Steve Kargl wrote: > > > The fix in > > 37f604b49d4a seems rather questionable especially given > > that there is no comment about why the macro is expanded > > to a zero-trip loop. > > > I’m not sure how I could have been much more clear than this: > > VNET_FOREACH() is a LIST_FOREACH if VIMAGE is set, but empty if it's > not. This means that users of the macro couldn't use 'continue' or > 'break' as one would expect of a loop. Comments belong in the code. /* Kludge to prevent non-vimage kernels from choking to death. */ #define VNET_FOREACH(arg) for (int _vn = 0; _vn == 0; _vn++) -- Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YscgxsiiF0eCdKka>