Re: [PATCH] signal: simplify next_signal()
From: Oleg Nesterov
Date: Wed Dec 02 2026 - 04:41:08 EST
On 12/01, Bradley Morgan wrote:
>
> _NSIG_WORDS is a compile time constant, so the compiler unrolls the
> loop anyway and the switch is just duplicate code. Same thing commit
> b7a8d7589a632 ("kernel: refactor: shorten has_pending_signals")
> removed.
Looks correct at first glance, I'll recheck...
But let me ask... Since you simplify this function anyway, perhaps
__ffs(x) make more sense than ffz(~x) ?
Oleg.