mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Simplify issig().
We always call it twice with JUSTLOOKING and then FORREAL. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Closes #16225
This commit is contained in:
committed by
GitHub
parent
6b95031f56
commit
01c8efdd59
@@ -152,26 +152,16 @@ spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...)
|
||||
EXPORT_SYMBOL(spl_kthread_create);
|
||||
|
||||
/*
|
||||
* The "why" argument indicates the allowable side-effects of the call:
|
||||
*
|
||||
* FORREAL: Extract the next pending signal from p_sig into p_cursig;
|
||||
* stop the process if a stop has been requested or if a traced signal
|
||||
* is pending.
|
||||
*
|
||||
* JUSTLOOKING: Don't stop the process, just indicate whether or not
|
||||
* a signal might be pending (FORREAL is needed to tell for sure).
|
||||
* Extract the next pending signal from p_sig into p_cursig; stop the process
|
||||
* if a stop has been requested or if a traced signal is pending.
|
||||
*/
|
||||
int
|
||||
issig(int why)
|
||||
issig(void)
|
||||
{
|
||||
ASSERT(why == FORREAL || why == JUSTLOOKING);
|
||||
|
||||
if (!signal_pending(current))
|
||||
return (0);
|
||||
|
||||
if (why != FORREAL)
|
||||
return (1);
|
||||
|
||||
struct task_struct *task = current;
|
||||
spl_kernel_siginfo_t __info;
|
||||
sigset_t set;
|
||||
|
||||
Reference in New Issue
Block a user