mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
signal: make wants_signal() return bool
wants_signal() already behaves like a boolean function. Let's actually declare it as such too. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Al Viro <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Morris <[email protected]> Cc: Kees Cook <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephen Smalley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8f11351eee
commit
acd14e62f0
1 changed files with 9 additions and 5 deletions
|
|
@ -879,16 +879,20 @@ static bool prepare_signal(int sig, struct task_struct *p, bool force)
|
|||
* as soon as they're available, so putting the signal on the shared queue
|
||||
* will be equivalent to sending it to one such thread.
|
||||
*/
|
||||
static inline int wants_signal(int sig, struct task_struct *p)
|
||||
static inline bool wants_signal(int sig, struct task_struct *p)
|
||||
{
|
||||
if (sigismember(&p->blocked, sig))
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
if (p->flags & PF_EXITING)
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
if (sig == SIGKILL)
|
||||
return 1;
|
||||
return true;
|
||||
|
||||
if (task_is_stopped_or_traced(p))
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return task_curr(p) || !signal_pending(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue