kernel: add task_sigpending() helper
authorJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 17:29:38 +0000 (11:29 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Oct 2020 14:39:17 +0000 (08:39 -0600)
commit049e78826524d84b23322eacc2946e1d7bf399fc
tree7a9bf750010f1a3d0814c4d2d39d76dfe9688788
parent4012b2af822ca56441ed65c437f8132fe68a7adc
kernel: add task_sigpending() helper

This is in preparation for maintaining signal_pending() as the decider
of whether or not a schedule() loop should be broken, or continue
sleeping. This is different than the core signal use cases, where we
really want to know if an actual signal is pending or not.
task_sigpending() returns non-zero if TIF_SIGPENDING is set.

Only core kernel use cases should care about the distinction between
the two, make sure those use the task_sigpending() helper.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/sched/signal.h
kernel/events/uprobes.c
kernel/ptrace.c
kernel/signal.c