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.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5395a6176f4b..c5d3f847ca8d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -766,7 +766,6 @@ struct sched_domain {
766 struct sched_domain *child; /* bottom domain must be null terminated */ 766 struct sched_domain *child; /* bottom domain must be null terminated */
767 struct sched_group *groups; /* the balancing groups of the domain */ 767 struct sched_group *groups; /* the balancing groups of the domain */
768 cpumask_t span; /* span of all CPUs in this domain */ 768 cpumask_t span; /* span of all CPUs in this domain */
769 int first_cpu; /* cache of the first cpu in this domain */
770 unsigned long min_interval; /* Minimum balance interval ms */ 769 unsigned long min_interval; /* Minimum balance interval ms */
771 unsigned long max_interval; /* Maximum balance interval ms */ 770 unsigned long max_interval; /* Maximum balance interval ms */
772 unsigned int busy_factor; /* less balancing by factor if busy */ 771 unsigned int busy_factor; /* less balancing by factor if busy */
@@ -1848,7 +1847,9 @@ extern void exit_thread(void);
1848extern void exit_files(struct task_struct *); 1847extern void exit_files(struct task_struct *);
1849extern void __cleanup_signal(struct signal_struct *); 1848extern void __cleanup_signal(struct signal_struct *);
1850extern void __cleanup_sighand(struct sighand_struct *); 1849extern void __cleanup_sighand(struct sighand_struct *);
1850
1851extern void exit_itimers(struct signal_struct *); 1851extern void exit_itimers(struct signal_struct *);
1852extern void flush_itimer_signals(void);
1852 1853
1853extern NORET_TYPE void do_group_exit(int); 1854extern NORET_TYPE void do_group_exit(int);
1854 1855
@@ -2025,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p)
2025 return signal_pending(p) && __fatal_signal_pending(p); 2026 return signal_pending(p) && __fatal_signal_pending(p);
2026} 2027}
2027 2028
2029static inline int signal_pending_state(long state, struct task_struct *p)
2030{
2031 if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
2032 return 0;
2033 if (!signal_pending(p))
2034 return 0;
2035
2036 if (state & (__TASK_STOPPED | __TASK_TRACED))
2037 return 0;
2038
2039 return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
2040}
2041
2028static inline int need_resched(void) 2042static inline int need_resched(void)
2029{ 2043{
2030 return unlikely(test_thread_flag(TIF_NEED_RESCHED)); 2044 return unlikely(test_thread_flag(TIF_NEED_RESCHED));