Re: [PATCH] use 1ULL instead of 1UL in kernel/signal.c

Matthew Wilcox
2002-10-23T13:11:03Z

On Wed, Oct 23, 2002 at 12:17:12AM +0100, Alan Cox wrote:
> Care to move the define into include/asm-foo then ?

How about this instead? All other arches define SIGRTMIN to be 32, so
this only affects PA.

Index: kernel/signal.c
===================================================================
RCS file: /var/cvs/linux-2.5/kernel/signal.c,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 signal.c
--- kernel/signal.c 21 Oct 2002 03:07:20 -0000 1.1.2.4
+++ kernel/signal.c 23 Oct 2002 13:14:33 -0000
@@ -96,7 +96,12 @@ int max_queued_signals = 1024;
#define M_SIGEMT 0
#endif

+#if SIGRTMIN > 32
+#define M(sig) (1ULL << (sig))
+#else
#define M(sig) (1UL << (sig))
+#endif
+#define T(sig, mask) (M(sig) & mask)

#define SIG_USER_SPECIFIC_MASK (\
M(SIGILL) | M(SIGTRAP) | M(SIGABRT) | M(SIGBUS) | \
@@ -130,9 +135,6 @@ int max_queued_signals = 1024;
M(SIGQUIT) | M(SIGILL) | M(SIGTRAP) | M(SIGABRT) | \
M(SIGFPE) | M(SIGSEGV) | M(SIGBUS) | M(SIGSYS) | \
M(SIGXCPU) | M(SIGXFSZ) | M_SIGEMT )
-
-#define T(sig, mask) \
- ((1UL << (sig)) & mask)

#define sig_user_specific(sig) \
(((sig) < SIGRTMIN) && T(sig, SIG_USER_SPECIFIC_MASK))