2007-05-04 08:10:32

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] Move sig_kernel_* et al macros to linux/signal.h

On Sun, 29 Apr 2007 21:02:38 -0700 (PDT) Roland McGrath <[email protected]> wrote:

> This patch moves the sig_kernel_* and related macros from kernel/signal.c
> to linux/signal.h, and cleans them up slightly. I need the sig_kernel_*
> macros for default signal behavior in the utrace code, and want to avoid
> duplication or overhead to share the knowledge.
>
> ...
>
> +#ifdef SIGEMT
> +#define SIGEMT_MASK rt_sigmask(SIGEMT)
> +#else
> +#define SIGEMT_MASK 0
> +#endif
> +
> +#if SIGRTMIN > BITS_PER_LONG
> +#define rt_sigmask(sig) (1ULL << ((sig)-1))
> +#else
> +#define rt_sigmask(sig) sigmask(sig)
> +#endif
> +#define siginmask(sig, mask) (rt_sigmask(sig) & (mask))

Should we undef rt_sigmask and siginmask after using them here?


2007-05-04 19:43:18

by Roland McGrath

[permalink] [raw]
Subject: Re: [PATCH] Move sig_kernel_* et al macros to linux/signal.h

> Should we undef rt_sigmask and siginmask after using them here?

They are used in macros, so "after" using them doesn't happen inside the file.
To do this sig_kernel_* would have to be redefined as inlines.
That should be fine AFAIK, but I hadn't intended to perturb it like that.


Thanks,
Roland