Commit 0a60a8db authored by David S. Miller's avatar David S. Miller

[SPARC]: Update for dequeue_signal changes.

parent fc70a5c3
...@@ -1095,18 +1095,9 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, ...@@ -1095,18 +1095,9 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs,
sigset_t *mask = &current->blocked; sigset_t *mask = &current->blocked;
unsigned long signr = 0; unsigned long signr = 0;
local_irq_disable(); spin_lock_irq(&current->sig->siglock);
if (current->sig->shared_pending.head) { signr = dequeue_signal(mask, &info);
spin_lock(&current->sig->siglock); spin_unlock_irq(&current->sig->siglock);
signr = dequeue_signal(&current->sig->shared_pending, mask, &info);
spin_unlock(&current->sig->siglock);
}
if (!signr) {
spin_lock(&current->sig->siglock);
signr = dequeue_signal(&current->pending, mask, &info);
spin_unlock(&current->sig->siglock);
}
local_irq_enable();
if (!signr) if (!signr)
break; break;
......
...@@ -645,18 +645,9 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs, ...@@ -645,18 +645,9 @@ static int do_signal(sigset_t *oldset, struct pt_regs * regs,
sigset_t *mask = &current->blocked; sigset_t *mask = &current->blocked;
unsigned long signr = 0; unsigned long signr = 0;
local_irq_disable(); spin_lock_irq(&current->sig->siglock);
if (current->sig->shared_pending.head) { signr = dequeue_signal(mask, &info);
spin_lock(&current->sig->siglock); spin_unlock_irq(&current->sig->siglock);
signr = dequeue_signal(&current->sig->shared_pending, mask, &info);
spin_unlock(&current->sig->siglock);
}
if (!signr) {
spin_lock(&current->sig->siglock);
signr = dequeue_signal(&current->pending, mask, &info);
spin_unlock(&current->sig->siglock);
}
local_irq_enable();
if (!signr) if (!signr)
break; break;
......
...@@ -1284,18 +1284,9 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs, ...@@ -1284,18 +1284,9 @@ int do_signal32(sigset_t *oldset, struct pt_regs * regs,
sigset_t *mask = &current->blocked; sigset_t *mask = &current->blocked;
unsigned long signr = 0; unsigned long signr = 0;
local_irq_disable(); spin_lock_irq(&current->sig->siglock);
if (current->sig->shared_pending.head) { signr = dequeue_signal(mask, &info);
spin_lock(&current->sig->siglock); spin_unlock_irq(&current->sig->siglock);
signr = dequeue_signal(&current->sig->shared_pending, mask, &info);
spin_unlock(&current->sig->siglock);
}
if (!signr) {
spin_lock(&current->sig->siglock);
signr = dequeue_signal(&current->pending, mask, &info);
spin_unlock(&current->sig->siglock);
}
local_irq_enable();
if (!signr) if (!signr)
break; break;
......
...@@ -1972,10 +1972,7 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo, ...@@ -1972,10 +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->sig->siglock); sig = dequeue_signal(&these, &info);
sig = dequeue_signal(&current->sig->shared_pending, &these, &info);
if (!sig)
sig = dequeue_signal(&current->pending, &these, &info);
if (!sig) { if (!sig) {
timeout = MAX_SCHEDULE_TIMEOUT; timeout = MAX_SCHEDULE_TIMEOUT;
if (uts) if (uts)
...@@ -1989,23 +1986,18 @@ sys32_rt_sigtimedwait(sigset_t32 *uthese, siginfo_t32 *uinfo, ...@@ -1989,23 +1986,18 @@ 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->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->sig->siglock); sig = dequeue_signal(&these, &info);
sig = dequeue_signal(&current->sig->shared_pending, &these, &info);
if (!sig)
sig = dequeue_signal(&current->pending, &these, &info);
current->blocked = current->real_blocked; current->blocked = current->real_blocked;
siginitset(&current->real_blocked, 0); siginitset(&current->real_blocked, 0);
recalc_sigpending(); recalc_sigpending();
} }
} }
spin_unlock(&current->sig->siglock);
spin_unlock_irq(&current->sig->siglock); spin_unlock_irq(&current->sig->siglock);
if (sig) { if (sig) {
......
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