aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-07 02:07:35 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-07 02:07:35 -0400
commitd763d5edf945eec47bd443b699f174976f0afc13 (patch)
tree3e5cd46b9a783999716bf92176854f4f1215d930 /include/linux/sched.h
parent790e2a290b499b0400254e6870ec27969065d122 (diff)
parent1b40a895df6c7d5a80e71f65674060b03d84bbef (diff)
Merge branch 'linus' into tracing/mmiotrace
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 c0b1c69b55ce..aa609858aef0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -768,7 +768,6 @@ struct sched_domain {
768 struct sched_domain *child; /* bottom domain must be null terminated */ 768 struct sched_domain *child; /* bottom domain must be null terminated */
769 struct sched_group *groups; /* the balancing groups of the domain */ 769 struct sched_group *groups; /* the balancing groups of the domain */
770 cpumask_t span; /* span of all CPUs in this domain */ 770 cpumask_t span; /* span of all CPUs in this domain */
771 int first_cpu; /* cache of the first cpu in this domain */
772 unsigned long min_interval; /* Minimum balance interval ms */ 771 unsigned long min_interval; /* Minimum balance interval ms */
773 unsigned long max_interval; /* Maximum balance interval ms */ 772 unsigned long max_interval; /* Maximum balance interval ms */
774 unsigned int busy_factor; /* less balancing by factor if busy */ 773 unsigned int busy_factor; /* less balancing by factor if busy */
@@ -1850,7 +1849,9 @@ extern void exit_thread(void);
1850extern void exit_files(struct task_struct *); 1849extern void exit_files(struct task_struct *);
1851extern void __cleanup_signal(struct signal_struct *); 1850extern void __cleanup_signal(struct signal_struct *);
1852extern void __cleanup_sighand(struct sighand_struct *); 1851extern void __cleanup_sighand(struct sighand_struct *);
1852
1853extern void exit_itimers(struct signal_struct *); 1853extern void exit_itimers(struct signal_struct *);
1854extern void flush_itimer_signals(void);
1854 1855
1855extern NORET_TYPE void do_group_exit(int); 1856extern NORET_TYPE void do_group_exit(int);
1856 1857
@@ -2027,6 +2028,19 @@ static inline int fatal_signal_pending(struct task_struct *p)
2027 return signal_pending(p) && __fatal_signal_pending(p); 2028 return signal_pending(p) && __fatal_signal_pending(p);
2028} 2029}
2029 2030
2031static inline int signal_pending_state(long state, struct task_struct *p)
2032{
2033 if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
2034 return 0;
2035 if (!signal_pending(p))
2036 return 0;
2037
2038 if (state & (__TASK_STOPPED | __TASK_TRACED))
2039 return 0;
2040
2041 return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
2042}
2043
2030static inline int need_resched(void) 2044static inline int need_resched(void)
2031{ 2045{
2032 return unlikely(test_thread_flag(TIF_NEED_RESCHED)); 2046 return unlikely(test_thread_flag(TIF_NEED_RESCHED));