mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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
Tony Hutter
parent
e5e4957a54
commit
a6198f34bd
@@ -39,20 +39,14 @@
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/debug.h>
|
||||
|
||||
#define FORREAL 0
|
||||
#define JUSTLOOKING 1
|
||||
|
||||
static __inline int
|
||||
issig(int why)
|
||||
issig(void)
|
||||
{
|
||||
struct thread *td = curthread;
|
||||
struct proc *p;
|
||||
int sig;
|
||||
|
||||
ASSERT(why == FORREAL || why == JUSTLOOKING);
|
||||
if (SIGPENDING(td)) {
|
||||
if (why == JUSTLOOKING)
|
||||
return (1);
|
||||
p = td->td_proc;
|
||||
PROC_LOCK(p);
|
||||
mtx_lock(&p->p_sigacts->ps_mtx);
|
||||
|
||||
Reference in New Issue
Block a user