diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9304027673b0..379531c08975 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1163,6 +1163,8 @@ struct sched_rt_entity { | |||
1163 | #endif | 1163 | #endif |
1164 | }; | 1164 | }; |
1165 | 1165 | ||
1166 | struct rcu_node; | ||
1167 | |||
1166 | struct task_struct { | 1168 | struct task_struct { |
1167 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ | 1169 | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ |
1168 | void *stack; | 1170 | void *stack; |
@@ -1206,10 +1208,12 @@ struct task_struct { | |||
1206 | unsigned int policy; | 1208 | unsigned int policy; |
1207 | cpumask_t cpus_allowed; | 1209 | cpumask_t cpus_allowed; |
1208 | 1210 | ||
1209 | #ifdef CONFIG_PREEMPT_RCU | 1211 | #ifdef CONFIG_TREE_PREEMPT_RCU |
1210 | int rcu_read_lock_nesting; | 1212 | int rcu_read_lock_nesting; |
1211 | int rcu_flipctr_idx; | 1213 | char rcu_read_unlock_special; |
1212 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | 1214 | struct rcu_node *rcu_blocked_node; |
1215 | struct list_head rcu_node_entry; | ||
1216 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | ||
1213 | 1217 | ||
1214 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1218 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
1215 | struct sched_info sched_info; | 1219 | struct sched_info sched_info; |
@@ -1725,6 +1729,28 @@ extern cputime_t task_gtime(struct task_struct *p); | |||
1725 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | 1729 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
1726 | #define used_math() tsk_used_math(current) | 1730 | #define used_math() tsk_used_math(current) |
1727 | 1731 | ||
1732 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
1733 | |||
1734 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | ||
1735 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | ||
1736 | #define RCU_READ_UNLOCK_GOT_QS (1 << 2) /* CPU has responded to RCU core. */ | ||
1737 | |||
1738 | static inline void rcu_copy_process(struct task_struct *p) | ||
1739 | { | ||
1740 | p->rcu_read_lock_nesting = 0; | ||
1741 | p->rcu_read_unlock_special = 0; | ||
1742 | p->rcu_blocked_node = NULL; | ||
1743 | INIT_LIST_HEAD(&p->rcu_node_entry); | ||
1744 | } | ||
1745 | |||
1746 | #else | ||
1747 | |||
1748 | static inline void rcu_copy_process(struct task_struct *p) | ||
1749 | { | ||
1750 | } | ||
1751 | |||
1752 | #endif | ||
1753 | |||
1728 | #ifdef CONFIG_SMP | 1754 | #ifdef CONFIG_SMP |
1729 | extern int set_cpus_allowed_ptr(struct task_struct *p, | 1755 | extern int set_cpus_allowed_ptr(struct task_struct *p, |
1730 | const struct cpumask *new_mask); | 1756 | const struct cpumask *new_mask); |