Re: [PATCH] signal: fix building with clang

From: Arnd Bergmann
Date: Thu Mar 07 2019 - 16:45:46 EST


On Thu, Mar 7, 2019 at 5:46 PM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> On 03/07, Arnd Bergmann wrote:
> >
> > We could use % everywhere,
>
> Yes.
>
> But again, why not simply use the "for (;;)" loops? Why we can't kill the
> supid switch(_NSIG_WORDS) tricks altogether?

I'd have to try, but I think you are right. It was probably an
overoptimization back in 1997 when the code got added to
linux-2.1.68pre1, and compilers have become smarter in the
meantime ;-)

Also, the common case these days is _NSIG_WORDS==1, which
is true on all 64-bit architectures other than MIPS64.

Arnd