Commit a4ff8dbb authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] sigmask() was mutilply defined

From:  Stephen Rothwell <sfr@canb.auug.org.au>

  Every definition if sigmask() was the same.  In one case it was
  mutilply defined for the arm architecture.  This patch removes all the
  architecture defines of sigmask and moves the generic define from
  the protection of __HAVE_ARCH_SIG_BITOPS.
parent a42bb8b4
......@@ -185,8 +185,6 @@ typedef struct sigaltstack {
#ifdef __KERNEL__
#include <asm/sigcontext.h>
#define sigmask(sig) (1UL << ((sig) - 1))
#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER
#endif
......
......@@ -209,8 +209,6 @@ static __inline__ int __gen_sigismember(sigset_t *set, int _sig)
__const_sigismember((set),(sig)) : \
__gen_sigismember((set),(sig)))
#define sigmask(sig) (1UL << ((sig) - 1))
static __inline__ int sigfindinword(unsigned long word)
{
__asm__("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc");
......
......@@ -207,8 +207,6 @@ extern __inline__ int __gen_sigismember(sigset_t *set, int _sig)
__const_sigismember(set,sig) : \
__gen_sigismember(set,sig))
#define sigmask(sig) (1UL << ((sig) - 1))
extern __inline__ int sigfindinword(unsigned long word)
{
__asm__("bfffo %1{#0,#0},%0" : "=d"(word) : "d"(word & -word) : "cc");
......
......@@ -165,8 +165,6 @@ typedef struct sigaltstack {
#ifdef __KERNEL__
#include <asm/sigcontext.h>
#define sigmask(sig) (1UL << ((sig) - 1))
#endif /* __KERNEL__ */
#endif /* __ASM_SH_SIGNAL_H */
......@@ -193,8 +193,6 @@ extern __inline__ int __gen_sigismember(sigset_t *set, int _sig)
__const_sigismember((set),(sig)) : \
__gen_sigismember((set),(sig)))
#define sigmask(sig) (1UL << ((sig) - 1))
extern __inline__ int sigfindinword(unsigned long word)
{
__asm__("bsfq %1,%0" : "=r"(word) : "rm"(word) : "cc");
......
......@@ -60,10 +60,10 @@ static inline int sigfindinword(unsigned long word)
return ffz(~word);
}
#define sigmask(sig) (1UL << ((sig) - 1))
#endif /* __HAVE_ARCH_SIG_BITOPS */
#define sigmask(sig) (1UL << ((sig) - 1))
#ifndef __HAVE_ARCH_SIG_SETOPS
#include <linux/string.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment