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:
Pawel Jakub Dawidek
2024-05-29 10:49:11 -07:00
committed by Tony Hutter
parent e5e4957a54
commit a6198f34bd
12 changed files with 14 additions and 35 deletions
+1 -7
View File
@@ -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);