Re: [PATCH 01/11] signals: kill sigfindinword()
From: Oleg Nesterov
Date: Mon Mar 24 2014 - 14:09:00 EST
Hi Geert,
On 03/24, Geert Uytterhoeven wrote:
>
> Hi Oleg,
>
> On Sun, Mar 23, 2014 at 8:37 PM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> > It has no users and it doesn't look useful. I do not know why/when it
> > was introduced, I can't even find any user in the git history.
>
> 2.1.68pre1 for i386, 2.1.87pre1 for m68k (which used to follow i386 very
> closely ;-), but never used in mainline code.
>
> > Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Thanks ;)
Do you think __HAVE_ARCH_SIG_* actually make sense? Only __i386__ and m68k
define _BITOPS, and nobody defines _SETOPS. Does this asm really helps to
generate a better code?
It seems to me it would be better to always use the generic code, although
perhaps we should cleanup it and even convert to use bitops/bitmask. The
home-grown bitmask implementation in signal.h looks a bit ugly.
At least we should move the definition of sigset_t into linux/signal.h,
this should be simple. It must be the same on every arch anyway, at least
has_pending_signals() assumes that sigset_t == long[_NSIG_WORDS].
And I can't understand why do we need rt_sigmask()... I think we can just
do
- #define sigmask(sig) (1UL << ((sig) - 1))
+ #define sigmask(sig) (1ULL << ((sig) - 1))
This should not change the code generation, gcc is smart enough, sig is
always constant...
Looks like, this code needs a lot of boring cleanups.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/