]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/sched.h
KVM: close timer injection race window in __vcpu_run
[linux-2.6-omap-h63xx.git] / include / linux / sched.h
index 3e05e547474977da3a31495c0907a1b34674a756..c5d3f847ca8d05bd52ca575608c2d428a23d1b28 100644 (file)
@@ -766,7 +766,6 @@ struct sched_domain {
        struct sched_domain *child;     /* bottom domain must be null terminated */
        struct sched_group *groups;     /* the balancing groups of the domain */
        cpumask_t span;                 /* span of all CPUs in this domain */
-       int first_cpu;                  /* cache of the first cpu in this domain */
        unsigned long min_interval;     /* Minimum balance interval ms */
        unsigned long max_interval;     /* Maximum balance interval ms */
        unsigned int busy_factor;       /* less balancing by factor if busy */
@@ -2027,6 +2026,19 @@ static inline int fatal_signal_pending(struct task_struct *p)
        return signal_pending(p) && __fatal_signal_pending(p);
 }
 
+static inline int signal_pending_state(long state, struct task_struct *p)
+{
+       if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL)))
+               return 0;
+       if (!signal_pending(p))
+               return 0;
+
+       if (state & (__TASK_STOPPED | __TASK_TRACED))
+               return 0;
+
+       return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p);
+}
+
 static inline int need_resched(void)
 {
        return unlikely(test_thread_flag(TIF_NEED_RESCHED));