aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4d1905245c7a..ad3ec9ec61f7 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -854,6 +854,16 @@ struct signal_struct {
854 854
855#define SIGNAL_UNKILLABLE 0x00000040 /* for init: ignore fatal signals */ 855#define SIGNAL_UNKILLABLE 0x00000040 /* for init: ignore fatal signals */
856 856
857#define SIGNAL_STOP_MASK (SIGNAL_CLD_MASK | SIGNAL_STOP_STOPPED | \
858 SIGNAL_STOP_CONTINUED)
859
860static inline void signal_set_stop_flags(struct signal_struct *sig,
861 unsigned int flags)
862{
863 WARN_ON(sig->flags & (SIGNAL_GROUP_EXIT|SIGNAL_GROUP_COREDUMP));
864 sig->flags = (sig->flags & ~SIGNAL_STOP_MASK) | flags;
865}
866
857/* If true, all threads except ->group_exit_task have pending SIGKILL */ 867/* If true, all threads except ->group_exit_task have pending SIGKILL */
858static inline int signal_group_exit(const struct signal_struct *sig) 868static inline int signal_group_exit(const struct signal_struct *sig)
859{ 869{