Commit 6e7ce541 authored by Linus Torvalds's avatar Linus Torvalds Committed by Vojtech Pavlik

Make dequeue_signal() take the process as an argument.

This simplifies it and makes it more generic.
parent 6bbe7849
......@@ -522,7 +522,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
struct k_sigaction *ka;
spin_lock_irq(&current->sighand->siglock);
signr = dequeue_signal(&current->blocked, &info);
signr = dequeue_signal(current, &current->blocked, &info);
spin_unlock_irq(&current->sighand->siglock);
if (!signr)
......
......@@ -1004,7 +1004,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
for (;;) {
int signr;
signr = dequeue_signal(&current->blocked, &info);
signr = dequeue_signal(current, &current->blocked, &info);
if (!signr)
break;
......
......@@ -183,7 +183,7 @@ asmlinkage int do_irix_signal(sigset_t *oldset, struct pt_regs *regs)
unsigned long signr;
spin_lock_irq(&current->sigmask_lock);
signr = dequeue_signal(&current->blocked, &info);
signr = dequeue_signal(current, &current->blocked, &info);
spin_unlock_irq(&current->sigmask_lock);
if (!signr)
......
......@@ -1726,7 +1726,7 @@ sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo,
}
spin_lock_irq(&current->sighand->siglock);
sig = dequeue_signal(&these, &info);
sig = dequeue_signal(current, &these, &info);
if (!sig) {
/* None ready -- temporarily unblock those we're interested
in so that we'll be awakened when they arrive. */
......@@ -1744,7 +1744,7 @@ sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo,
timeout = schedule_timeout(timeout);
spin_lock_irq(&current->sighand->siglock);
sig = dequeue_signal(&these, &info);
sig = dequeue_signal(current, &these, &info);
current->blocked = current->real_blocked;
siginitset(&current->real_blocked, 0);
recalc_sigpending();
......
......@@ -1813,7 +1813,7 @@ sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo,
}
spin_lock_irq(&current->sighand->siglock);
sig = dequeue_signal(&these, &info);
sig = dequeue_signal(current, &these, &info);
if (!sig) {
timeout = MAX_SCHEDULE_TIMEOUT;
if (uts)
......@@ -1833,7 +1833,7 @@ sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo,
timeout = schedule_timeout(timeout);
spin_lock_irq(&current->sighand->siglock);
sig = dequeue_signal(&these, &info);
sig = dequeue_signal(current, &these, &info);
current->blocked = current->real_blocked;
siginitset(&current->real_blocked, 0);
recalc_sigpending();
......
......@@ -149,7 +149,7 @@ static int nbd_xmit(int send, struct socket *sock, char *buf, int size, int msg_
spin_lock_irqsave(&current->sighand->siglock, flags);
printk(KERN_WARNING "NBD (pid %d: %s) got signal %d\n",
current->pid, current->comm,
dequeue_signal(&current->blocked, &info));
dequeue_signal(current, &current->blocked, &info));
spin_unlock_irqrestore(&current->sighand->siglock, flags);
result = -EINTR;
break;
......
......@@ -47,7 +47,7 @@ static inline void afs_discard_my_signals(void)
siginfo_t sinfo;
spin_lock_irq(&current->sighand->siglock);
dequeue_signal(&current->blocked,&sinfo);
dequeue_signal(current,&current->blocked,&sinfo);
spin_unlock_irq(&current->sighand->siglock);
}
}
......
......@@ -3378,7 +3378,7 @@ jffs_garbage_collect_thread(void *ptr)
unsigned long signr = 0;
spin_lock_irq(&current->sighand->siglock);
signr = dequeue_signal(&current->blocked, &info);
signr = dequeue_signal(current, &current->blocked, &info);
spin_unlock_irq(&current->sighand->siglock);
switch(signr) {
......
......@@ -114,7 +114,7 @@ static int jffs2_garbage_collect_thread(void *_c)
unsigned long signr;
spin_lock_irq(&current_sig_lock);
signr = dequeue_signal(&current->blocked, &info);
signr = dequeue_signal(current, &current->blocked, &info);
spin_unlock_irq(&current_sig_lock);
switch(signr) {
......
......@@ -530,7 +530,7 @@ extern int in_egroup_p(gid_t);
extern void proc_caches_init(void);
extern void flush_signals(struct task_struct *);
extern void flush_signal_handlers(struct task_struct *);
extern int dequeue_signal(sigset_t *mask, siginfo_t *info);
extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
extern void block_all_signals(int (*notifier)(void *priv), void *priv,
sigset_t *mask);
extern void unblock_all_signals(void);
......
......@@ -485,11 +485,11 @@ static int __dequeue_signal(struct sigpending *pending, sigset_t *mask,
*
* All callers have to hold the siglock.
*/
int dequeue_signal(sigset_t *mask, siginfo_t *info)
int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info)
{
int signr = __dequeue_signal(&current->pending, mask, info);
int signr = __dequeue_signal(&tsk->pending, mask, info);
if (!signr)
signr = __dequeue_signal(&current->signal->shared_pending,
signr = __dequeue_signal(&tsk->signal->shared_pending,
mask, info);
return signr;
}
......@@ -1456,7 +1456,7 @@ int get_signal_to_deliver(siginfo_t *info, struct pt_regs *regs, void *cookie)
continue;
}
dequeue:
signr = dequeue_signal(mask, info);
signr = dequeue_signal(current, mask, info);
spin_unlock_irq(&current->sighand->siglock);
if (!signr)
......@@ -1811,7 +1811,7 @@ sys_rt_sigtimedwait(const sigset_t *uthese, siginfo_t *uinfo,
}
spin_lock_irq(&current->sighand->siglock);
sig = dequeue_signal(&these, &info);
sig = dequeue_signal(current, &these, &info);
if (!sig) {
timeout = MAX_SCHEDULE_TIMEOUT;
if (uts)
......@@ -1831,7 +1831,7 @@ sys_rt_sigtimedwait(const sigset_t *uthese, siginfo_t *uinfo,
timeout = schedule_timeout(timeout);
spin_lock_irq(&current->sighand->siglock);
sig = dequeue_signal(&these, &info);
sig = dequeue_signal(current, &these, &info);
current->blocked = current->real_blocked;
siginitset(&current->real_blocked, 0);
recalc_sigpending();
......
......@@ -55,7 +55,7 @@ static inline void rxrpc_discard_my_signals(void)
siginfo_t sinfo;
spin_lock_irq(&current->sighand->siglock);
dequeue_signal(&current->blocked,&sinfo);
dequeue_signal(current,&current->blocked,&sinfo);
spin_unlock_irq(&current->sighand->siglock);
}
}
......
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