mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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
@@ -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);
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#include <linux/sched/signal.h>
|
||||
#endif
|
||||
|
||||
#define FORREAL 0 /* Usual side-effects */
|
||||
#define JUSTLOOKING 1 /* Don't stop the process */
|
||||
|
||||
extern int issig(int why);
|
||||
extern int issig(void);
|
||||
|
||||
#endif /* SPL_SIGNAL_H */
|
||||
|
||||
@@ -249,8 +249,7 @@ extern struct proc p0;
|
||||
extern kthread_t *zk_thread_create(const char *name, void (*func)(void *),
|
||||
void *arg, size_t stksize, int state);
|
||||
|
||||
#define issig(why) (FALSE)
|
||||
#define ISSIG(thr, why) (FALSE)
|
||||
#define issig() (FALSE)
|
||||
|
||||
#define KPREEMPT_SYNC (-1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user