diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index f1b46b88f6f5..ded3fb63fb06 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2213,6 +2213,14 @@ static inline void restore_saved_sigmask(void) set_current_blocked(¤t->saved_sigmask); } +static inline sigset_t *sigmask_to_save(void) +{ + sigset_t *res = ¤t->blocked; + if (unlikely(test_restore_sigmask())) + res = ¤t->saved_sigmask; + return res; +} + static inline int kill_cad_pid(int sig, int priv) { return kill_pid(cad_pid, sig, priv); |