]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/kernel/irixsig.c
Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release
[linux-2.6-omap-h63xx.git] / arch / mips / kernel / irixsig.c
index a0a91056fda722472edd644e9fa73e379d697a3a..5b10ac133ec837b4ccd91844a42321d6a68769fd 100644 (file)
 
 #define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
 
+#define _IRIX_NSIG             128
+#define _IRIX_NSIG_BPW         BITS_PER_LONG
+#define _IRIX_NSIG_WORDS       (_IRIX_NSIG / _IRIX_NSIG_BPW)
+
 typedef struct {
-       unsigned long sig[4];
+       unsigned long sig[_IRIX_NSIG_WORDS];
 } irix_sigset_t;
 
 struct sigctx_irix5 {
@@ -426,6 +430,7 @@ asmlinkage int irix_sigprocmask(int how, irix_sigset_t __user *new,
                        break;
 
                default:
+                       spin_unlock_irq(&current->sighand->siglock);
                        return -EINVAL;
                }
                recalc_sigpending();
@@ -527,7 +532,7 @@ asmlinkage int irix_sigpoll_sys(unsigned long __user *set,
 
                expire = schedule_timeout_interruptible(expire);
 
-               for (i=0; i<=4; i++)
+               for (i=0; i < _IRIX_NSIG_WORDS; i++)
                        tmp |= (current->pending.signal.sig[i] & kset.sig[i]);
 
                if (tmp)