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