[RFC PATCH 6/8] signals: Round up _NSIG_WORDS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When needed, round _NSIG_WORDS up for generic and x86 architectures.

Signed-off-by: Walt Drummond <walt@xxxxxxxxxxx>
---
 arch/x86/include/asm/signal.h     | 2 +-
 include/uapi/asm-generic/signal.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 9bac7c6e524c..d8e2efe6cd46 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -16,7 +16,7 @@
 # define _NSIG_BPW	64
 #endif
 
-#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
+#define _NSIG_WORDS	((_NSIG + _NSIG_BPW - 1) / _NSIG_BPW)
 
 typedef unsigned long old_sigset_t;		/* at least 32 bits */
 
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h
index f634822906e4..3c4cc9b8378e 100644
--- a/include/uapi/asm-generic/signal.h
+++ b/include/uapi/asm-generic/signal.h
@@ -6,7 +6,7 @@
 
 #define _NSIG		64
 #define _NSIG_BPW	__BITS_PER_LONG
-#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
+#define _NSIG_WORDS	((_NSIG + _NSIG_BPW - 1) / _NSIG_BPW)
 
 #define SIGHUP		 1
 #define SIGINT		 2
-- 
2.30.2




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux