Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efee984c authored by Al Viro's avatar Al Viro
Browse files

new helper: signal_delivered()



Does block_sigmask() + tracehook_signal_handler();  called when
sigframe has been successfully built.  All architectures converted
to it; block_sigmask() itself is gone now (merged into this one).

I'm still not too happy with the signature, but that's a separate
story (IMO we need a structure that would contain signal number +
siginfo + k_sigaction, so that get_signal_to_deliver() would fill one,
signal_delivered(), handle_signal() and probably setup...frame() -
take one).

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 17440f17
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
		force_sigsegv(sig, current);
		return;
	}
	block_sigmask(ka, sig);
	signal_delivered(sig, info, ka, regs, 0);
}

static inline void
+1 −6
Original line number Diff line number Diff line
@@ -557,12 +557,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
		force_sigsegv(sig, tsk);
		return;
	}

	/*
	 * Block the signal if we were successful.
	 */
	block_sigmask(ka, sig);
	tracehook_signal_handler(sig, info, ka, regs, 0);
	signal_delivered(sig, info, ka, regs, 0);
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
	if (ret != 0)
		force_sigsegv(sig, current);
	else
		block_sigmask(ka, sig);
		signal_delivered(sig, info, ka, regs, 0);
}

/*
+1 −2
Original line number Diff line number Diff line
@@ -260,8 +260,7 @@ handle_signal(int sig, siginfo_t *info, struct k_sigaction *ka,
	if (ret)
		return;

	block_sigmask(ka, sig);
	tracehook_signal_handler(sig, info, ka, regs,
	signal_delivered(sig, info, ka, regs,
			test_thread_flag(TIF_SINGLESTEP));
}

+1 −2
Original line number Diff line number Diff line
@@ -276,8 +276,7 @@ static void handle_signal(int sig,
	/* Set up the stack frame */
	if (setup_rt_frame(sig, ka, info, sigmask_to_save(), regs) < 0)
		return;
	block_sigmask(ka, sig);
	tracehook_signal_handler(sig, info, ka, regs, 0);
	signal_delivered(sig, info, ka, regs, 0);
}

/*
Loading