Commit 155ee8a0 authored by David S. Miller's avatar David S. Miller

[SPARC]: sigmask_lock --> sig->siglock

parent 826ee750
...@@ -136,11 +136,11 @@ asmlinkage void _sigpause_common(old_sigset_t set, struct pt_regs *regs) ...@@ -136,11 +136,11 @@ asmlinkage void _sigpause_common(old_sigset_t set, struct pt_regs *regs)
sigset_t saveset; sigset_t saveset;
set &= _BLOCKABLE; set &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
siginitset(&current->blocked, set); siginitset(&current->blocked, set);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->pc = regs->npc; regs->pc = regs->npc;
regs->npc += 4; regs->npc += 4;
...@@ -193,11 +193,11 @@ asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize, ...@@ -193,11 +193,11 @@ asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize,
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
oldset = current->blocked; oldset = current->blocked;
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->pc = regs->npc; regs->pc = regs->npc;
regs->npc += 4; regs->npc += 4;
...@@ -299,10 +299,10 @@ static inline void do_new_sigreturn (struct pt_regs *regs) ...@@ -299,10 +299,10 @@ static inline void do_new_sigreturn (struct pt_regs *regs)
goto segv_and_exit; goto segv_and_exit;
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return; return;
segv_and_exit: segv_and_exit:
...@@ -346,10 +346,10 @@ asmlinkage void do_sigreturn(struct pt_regs *regs) ...@@ -346,10 +346,10 @@ asmlinkage void do_sigreturn(struct pt_regs *regs)
goto segv_and_exit; goto segv_and_exit;
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->pc = pc; regs->pc = pc;
regs->npc = npc; regs->npc = npc;
...@@ -416,10 +416,10 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs) ...@@ -416,10 +416,10 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
do_sigaltstack(&st, NULL, (unsigned long)sf); do_sigaltstack(&st, NULL, (unsigned long)sf);
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return; return;
segv: segv:
send_sig(SIGSEGV, current, 1); send_sig(SIGSEGV, current, 1);
...@@ -999,10 +999,10 @@ asmlinkage int svr4_setcontext (svr4_ucontext_t *c, struct pt_regs *regs) ...@@ -999,10 +999,10 @@ asmlinkage int svr4_setcontext (svr4_ucontext_t *c, struct pt_regs *regs)
set.sig[3] = setv.sigbits[3]; set.sig[3] = setv.sigbits[3];
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->pc = pc; regs->pc = pc;
regs->npc = npc | 1; regs->npc = npc | 1;
err |= __get_user(regs->y, &((*gr) [SVR4_Y])); err |= __get_user(regs->y, &((*gr) [SVR4_Y]));
...@@ -1039,11 +1039,11 @@ handle_signal(unsigned long signr, struct k_sigaction *ka, ...@@ -1039,11 +1039,11 @@ handle_signal(unsigned long signr, struct k_sigaction *ka,
if(ka->sa.sa_flags & SA_ONESHOT) if(ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL; ka->sa.sa_handler = SIG_DFL;
if(!(ka->sa.sa_flags & SA_NOMASK)) { if(!(ka->sa.sa_flags & SA_NOMASK)) {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
sigaddset(&current->blocked, signr); sigaddset(&current->blocked, signr);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
} }
} }
...@@ -1102,9 +1102,9 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, ...@@ -1102,9 +1102,9 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs,
spin_unlock(&current->sig->siglock); spin_unlock(&current->sig->siglock);
} }
if (!signr) { if (!signr) {
spin_lock(&current->sigmask_lock); spin_lock(&current->sig->siglock);
signr = dequeue_signal(&current->pending, mask, &info); signr = dequeue_signal(&current->pending, mask, &info);
spin_unlock(&current->sigmask_lock); spin_unlock(&current->sig->siglock);
} }
local_irq_enable(); local_irq_enable();
......
...@@ -279,11 +279,11 @@ asmlinkage unsigned long sunos_sigblock(unsigned long blk_mask) ...@@ -279,11 +279,11 @@ asmlinkage unsigned long sunos_sigblock(unsigned long blk_mask)
{ {
unsigned long old; unsigned long old;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
old = current->blocked.sig[0]; old = current->blocked.sig[0];
current->blocked.sig[0] |= (blk_mask & _BLOCKABLE); current->blocked.sig[0] |= (blk_mask & _BLOCKABLE);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return old; return old;
} }
...@@ -291,11 +291,11 @@ asmlinkage unsigned long sunos_sigsetmask(unsigned long newmask) ...@@ -291,11 +291,11 @@ asmlinkage unsigned long sunos_sigsetmask(unsigned long newmask)
{ {
unsigned long retval; unsigned long retval;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
retval = current->blocked.sig[0]; retval = current->blocked.sig[0];
current->blocked.sig[0] = (newmask & _BLOCKABLE); current->blocked.sig[0] = (newmask & _BLOCKABLE);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return retval; return retval;
} }
......
...@@ -69,9 +69,9 @@ static int powerd(void *__unused) ...@@ -69,9 +69,9 @@ static int powerd(void *__unused)
again: again:
while (button_pressed == 0) { while (button_pressed == 0) {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
flush_signals(current); flush_signals(current);
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
interruptible_sleep_on(&powerd_wait); interruptible_sleep_on(&powerd_wait);
} }
......
...@@ -99,10 +99,10 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs) ...@@ -99,10 +99,10 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)
goto do_sigsegv; goto do_sigsegv;
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
} }
if (test_thread_flag(TIF_32BIT)) { if (test_thread_flag(TIF_32BIT)) {
pc &= 0xffffffff; pc &= 0xffffffff;
...@@ -286,11 +286,11 @@ asmlinkage void _sigpause_common(old_sigset_t set, struct pt_regs *regs) ...@@ -286,11 +286,11 @@ asmlinkage void _sigpause_common(old_sigset_t set, struct pt_regs *regs)
} }
#endif #endif
set &= _BLOCKABLE; set &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
siginitset(&current->blocked, set); siginitset(&current->blocked, set);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
if (test_thread_flag(TIF_32BIT)) { if (test_thread_flag(TIF_32BIT)) {
regs->tpc = (regs->tnpc & 0xffffffff); regs->tpc = (regs->tnpc & 0xffffffff);
...@@ -346,11 +346,11 @@ asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize, struct pt_re ...@@ -346,11 +346,11 @@ asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize, struct pt_re
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
oldset = current->blocked; oldset = current->blocked;
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
if (test_thread_flag(TIF_32BIT)) { if (test_thread_flag(TIF_32BIT)) {
regs->tpc = (regs->tnpc & 0xffffffff); regs->tpc = (regs->tnpc & 0xffffffff);
...@@ -457,10 +457,10 @@ void do_rt_sigreturn(struct pt_regs *regs) ...@@ -457,10 +457,10 @@ void do_rt_sigreturn(struct pt_regs *regs)
set_fs(old_fs); set_fs(old_fs);
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return; return;
segv: segv:
send_sig(SIGSEGV, current, 1); send_sig(SIGSEGV, current, 1);
...@@ -593,11 +593,11 @@ static inline void handle_signal(unsigned long signr, struct k_sigaction *ka, ...@@ -593,11 +593,11 @@ static inline void handle_signal(unsigned long signr, struct k_sigaction *ka,
if (ka->sa.sa_flags & SA_ONESHOT) if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL; ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NOMASK)) { if (!(ka->sa.sa_flags & SA_NOMASK)) {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
sigaddset(&current->blocked,signr); sigaddset(&current->blocked,signr);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
} }
} }
...@@ -652,9 +652,9 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs, ...@@ -652,9 +652,9 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs,
spin_unlock(&current->sig->siglock); spin_unlock(&current->sig->siglock);
} }
if (!signr) { if (!signr) {
spin_lock(&current->sigmask_lock); spin_lock(&current->sig->siglock);
signr = dequeue_signal(&current->pending, mask, &info); signr = dequeue_signal(&current->pending, mask, &info);
spin_unlock(&current->sigmask_lock); spin_unlock(&current->sig->siglock);
} }
local_irq_enable(); local_irq_enable();
......
...@@ -143,11 +143,11 @@ asmlinkage void _sigpause32_common(old_sigset_t32 set, struct pt_regs *regs) ...@@ -143,11 +143,11 @@ asmlinkage void _sigpause32_common(old_sigset_t32 set, struct pt_regs *regs)
sigset_t saveset; sigset_t saveset;
set &= _BLOCKABLE; set &= _BLOCKABLE;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
saveset = current->blocked; saveset = current->blocked;
siginitset(&current->blocked, set); siginitset(&current->blocked, set);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->tpc = regs->tnpc; regs->tpc = regs->tnpc;
regs->tnpc += 4; regs->tnpc += 4;
...@@ -198,11 +198,11 @@ asmlinkage void do_rt_sigsuspend32(u32 uset, size_t sigsetsize, struct pt_regs * ...@@ -198,11 +198,11 @@ asmlinkage void do_rt_sigsuspend32(u32 uset, size_t sigsetsize, struct pt_regs *
case 1: set.sig[0] = set32.sig[0] + (((long)set32.sig[1]) << 32); case 1: set.sig[0] = set32.sig[0] + (((long)set32.sig[1]) << 32);
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
oldset = current->blocked; oldset = current->blocked;
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->tpc = regs->tnpc; regs->tpc = regs->tnpc;
regs->tnpc += 4; regs->tnpc += 4;
...@@ -311,10 +311,10 @@ void do_new_sigreturn32(struct pt_regs *regs) ...@@ -311,10 +311,10 @@ void do_new_sigreturn32(struct pt_regs *regs)
case 1: set.sig[0] = seta[0] + (((long)seta[1]) << 32); case 1: set.sig[0] = seta[0] + (((long)seta[1]) << 32);
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return; return;
segv: segv:
...@@ -358,10 +358,10 @@ asmlinkage void do_sigreturn32(struct pt_regs *regs) ...@@ -358,10 +358,10 @@ asmlinkage void do_sigreturn32(struct pt_regs *regs)
case 1: set.sig[0] = seta[0] + (((long)seta[1]) << 32); case 1: set.sig[0] = seta[0] + (((long)seta[1]) << 32);
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
if (test_thread_flag(TIF_32BIT)) { if (test_thread_flag(TIF_32BIT)) {
pc &= 0xffffffff; pc &= 0xffffffff;
...@@ -460,10 +460,10 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs) ...@@ -460,10 +460,10 @@ asmlinkage void do_rt_sigreturn32(struct pt_regs *regs)
case 1: set.sig[0] = seta.sig[0] + (((long)seta.sig[1]) << 32); case 1: set.sig[0] = seta.sig[0] + (((long)seta.sig[1]) << 32);
} }
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return; return;
segv: segv:
do_exit(SIGSEGV); do_exit(SIGSEGV);
...@@ -1058,10 +1058,10 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t *c, struct pt_regs *regs) ...@@ -1058,10 +1058,10 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t *c, struct pt_regs *regs)
set_fs(old_fs); set_fs(old_fs);
sigdelsetmask(&set, ~_BLOCKABLE); sigdelsetmask(&set, ~_BLOCKABLE);
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
current->blocked = set; current->blocked = set;
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
regs->tpc = pc; regs->tpc = pc;
regs->tnpc = npc | 1; regs->tnpc = npc | 1;
if (test_thread_flag(TIF_32BIT)) { if (test_thread_flag(TIF_32BIT)) {
...@@ -1240,11 +1240,11 @@ static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka, ...@@ -1240,11 +1240,11 @@ static inline void handle_signal32(unsigned long signr, struct k_sigaction *ka,
if (ka->sa.sa_flags & SA_ONESHOT) if (ka->sa.sa_flags & SA_ONESHOT)
ka->sa.sa_handler = SIG_DFL; ka->sa.sa_handler = SIG_DFL;
if (!(ka->sa.sa_flags & SA_NOMASK)) { if (!(ka->sa.sa_flags & SA_NOMASK)) {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
sigaddset(&current->blocked,signr); sigaddset(&current->blocked,signr);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
} }
} }
...@@ -1291,9 +1291,9 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs, ...@@ -1291,9 +1291,9 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs,
spin_unlock(&current->sig->siglock); spin_unlock(&current->sig->siglock);
} }
if (!signr) { if (!signr) {
spin_lock(&current->sigmask_lock); spin_lock(&current->sig->siglock);
signr = dequeue_signal(&current->pending, mask, &info); signr = dequeue_signal(&current->pending, mask, &info);
spin_unlock(&current->sigmask_lock); spin_unlock(&current->sig->siglock);
} }
local_irq_enable(); local_irq_enable();
......
...@@ -1972,7 +1972,7 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo, ...@@ -1972,7 +1972,7 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo,
} }
spin_lock_irq(&current->sig->siglock); spin_lock_irq(&current->sig->siglock);
spin_lock(&current->sigmask_lock); spin_lock(&current->sig->siglock);
sig = dequeue_signal(&current->sig->shared_pending, &these, &info); sig = dequeue_signal(&current->sig->shared_pending, &these, &info);
if (!sig) if (!sig)
sig = dequeue_signal(&current->pending, &these, &info); sig = dequeue_signal(&current->pending, &these, &info);
...@@ -1989,14 +1989,14 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo, ...@@ -1989,14 +1989,14 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo,
current->real_blocked = current->blocked; current->real_blocked = current->blocked;
sigandsets(&current->blocked, &current->blocked, &these); sigandsets(&current->blocked, &current->blocked, &these);
recalc_sigpending(); recalc_sigpending();
spin_unlock(&current->sigmask_lock); spin_unlock(&current->sig->siglock);
spin_unlock_irq(&current->sig->siglock); spin_unlock_irq(&current->sig->siglock);
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
timeout = schedule_timeout(timeout); timeout = schedule_timeout(timeout);
spin_lock_irq(&current->sig->siglock); spin_lock_irq(&current->sig->siglock);
spin_lock(&current->sigmask_lock); spin_lock(&current->sig->siglock);
sig = dequeue_signal(&current->sig->shared_pending, &these, &info); sig = dequeue_signal(&current->sig->shared_pending, &these, &info);
if (!sig) if (!sig)
sig = dequeue_signal(&current->pending, &these, &info); sig = dequeue_signal(&current->pending, &these, &info);
...@@ -2005,7 +2005,7 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo, ...@@ -2005,7 +2005,7 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo,
recalc_sigpending(); recalc_sigpending();
} }
} }
spin_unlock(&current->sigmask_lock); spin_unlock(&current->sig->siglock);
spin_unlock_irq(&current->sig->siglock); spin_unlock_irq(&current->sig->siglock);
if (sig) { if (sig) {
......
...@@ -234,11 +234,11 @@ asmlinkage u32 sunos_sigblock(u32 blk_mask) ...@@ -234,11 +234,11 @@ asmlinkage u32 sunos_sigblock(u32 blk_mask)
{ {
u32 old; u32 old;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
old = (u32) current->blocked.sig[0]; old = (u32) current->blocked.sig[0];
current->blocked.sig[0] |= (blk_mask & _BLOCKABLE); current->blocked.sig[0] |= (blk_mask & _BLOCKABLE);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return old; return old;
} }
...@@ -246,11 +246,11 @@ asmlinkage u32 sunos_sigsetmask(u32 newmask) ...@@ -246,11 +246,11 @@ asmlinkage u32 sunos_sigsetmask(u32 newmask)
{ {
u32 retval; u32 retval;
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
retval = (u32) current->blocked.sig[0]; retval = (u32) current->blocked.sig[0];
current->blocked.sig[0] = (newmask & _BLOCKABLE); current->blocked.sig[0] = (newmask & _BLOCKABLE);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return retval; return retval;
} }
......
...@@ -99,16 +99,16 @@ static inline long solaris_signal(int sig, u32 arg) ...@@ -99,16 +99,16 @@ static inline long solaris_signal(int sig, u32 arg)
static long solaris_sigset(int sig, u32 arg) static long solaris_sigset(int sig, u32 arg)
{ {
if (arg != 2) /* HOLD */ { if (arg != 2) /* HOLD */ {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigdelsetmask(&current->blocked, _S(sig)); sigdelsetmask(&current->blocked, _S(sig));
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return sig_handler (sig, arg, 0); return sig_handler (sig, arg, 0);
} else { } else {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigaddsetmask(&current->blocked, (_S(sig) & ~_BLOCKABLE)); sigaddsetmask(&current->blocked, (_S(sig) & ~_BLOCKABLE));
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return 0; return 0;
} }
} }
...@@ -120,10 +120,10 @@ static inline long solaris_sighold(int sig) ...@@ -120,10 +120,10 @@ static inline long solaris_sighold(int sig)
static inline long solaris_sigrelse(int sig) static inline long solaris_sigrelse(int sig)
{ {
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigdelsetmask(&current->blocked, _S(sig)); sigdelsetmask(&current->blocked, _S(sig));
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
return 0; return 0;
} }
...@@ -311,10 +311,10 @@ asmlinkage int solaris_sigpending(int which, u32 set) ...@@ -311,10 +311,10 @@ asmlinkage int solaris_sigpending(int which, u32 set)
u32 tmp[4]; u32 tmp[4];
switch (which) { switch (which) {
case 1: /* sigpending */ case 1: /* sigpending */
spin_lock_irq(&current->sigmask_lock); spin_lock_irq(&current->sig->siglock);
sigandsets(&s, &current->blocked, &current->pending.signal); sigandsets(&s, &current->blocked, &current->pending.signal);
recalc_sigpending(); recalc_sigpending();
spin_unlock_irq(&current->sigmask_lock); spin_unlock_irq(&current->sig->siglock);
break; break;
case 2: /* sigfillset - I just set signals which have linux equivalents */ case 2: /* sigfillset - I just set signals which have linux equivalents */
sigfillset(&s); sigfillset(&s);
......
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