diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1e2a6db2d7dd..e18473f0eb78 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1202,11 +1202,13 @@ struct task_struct { | |||
1202 | unsigned int policy; | 1202 | unsigned int policy; |
1203 | cpumask_t cpus_allowed; | 1203 | cpumask_t cpus_allowed; |
1204 | 1204 | ||
1205 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1205 | #ifdef CONFIG_PREEMPT_RCU |
1206 | int rcu_read_lock_nesting; | 1206 | int rcu_read_lock_nesting; |
1207 | char rcu_read_unlock_special; | 1207 | char rcu_read_unlock_special; |
1208 | struct rcu_node *rcu_blocked_node; | ||
1209 | struct list_head rcu_node_entry; | 1208 | struct list_head rcu_node_entry; |
1209 | #endif /* #ifdef CONFIG_PREEMPT_RCU */ | ||
1210 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
1211 | struct rcu_node *rcu_blocked_node; | ||
1210 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ | 1212 | #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */ |
1211 | 1213 | ||
1212 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) | 1214 | #if defined(CONFIG_SCHEDSTATS) || defined(CONFIG_TASK_DELAY_ACCT) |
@@ -1288,9 +1290,9 @@ struct task_struct { | |||
1288 | struct list_head cpu_timers[3]; | 1290 | struct list_head cpu_timers[3]; |
1289 | 1291 | ||
1290 | /* process credentials */ | 1292 | /* process credentials */ |
1291 | const struct cred *real_cred; /* objective and real subjective task | 1293 | const struct cred __rcu *real_cred; /* objective and real subjective task |
1292 | * credentials (COW) */ | 1294 | * credentials (COW) */ |
1293 | const struct cred *cred; /* effective (overridable) subjective task | 1295 | const struct cred __rcu *cred; /* effective (overridable) subjective task |
1294 | * credentials (COW) */ | 1296 | * credentials (COW) */ |
1295 | struct mutex cred_guard_mutex; /* guard against foreign influences on | 1297 | struct mutex cred_guard_mutex; /* guard against foreign influences on |
1296 | * credential calculations | 1298 | * credential calculations |
@@ -1418,7 +1420,7 @@ struct task_struct { | |||
1418 | #endif | 1420 | #endif |
1419 | #ifdef CONFIG_CGROUPS | 1421 | #ifdef CONFIG_CGROUPS |
1420 | /* Control Group info protected by css_set_lock */ | 1422 | /* Control Group info protected by css_set_lock */ |
1421 | struct css_set *cgroups; | 1423 | struct css_set __rcu *cgroups; |
1422 | /* cg_list protected by css_set_lock and tsk->alloc_lock */ | 1424 | /* cg_list protected by css_set_lock and tsk->alloc_lock */ |
1423 | struct list_head cg_list; | 1425 | struct list_head cg_list; |
1424 | #endif | 1426 | #endif |
@@ -1740,7 +1742,7 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1740 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) | 1742 | #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) |
1741 | #define used_math() tsk_used_math(current) | 1743 | #define used_math() tsk_used_math(current) |
1742 | 1744 | ||
1743 | #ifdef CONFIG_TREE_PREEMPT_RCU | 1745 | #ifdef CONFIG_PREEMPT_RCU |
1744 | 1746 | ||
1745 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ | 1747 | #define RCU_READ_UNLOCK_BLOCKED (1 << 0) /* blocked while in RCU read-side. */ |
1746 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ | 1748 | #define RCU_READ_UNLOCK_NEED_QS (1 << 1) /* RCU core needs CPU response. */ |
@@ -1749,7 +1751,9 @@ static inline void rcu_copy_process(struct task_struct *p) | |||
1749 | { | 1751 | { |
1750 | p->rcu_read_lock_nesting = 0; | 1752 | p->rcu_read_lock_nesting = 0; |
1751 | p->rcu_read_unlock_special = 0; | 1753 | p->rcu_read_unlock_special = 0; |
1754 | #ifdef CONFIG_TREE_PREEMPT_RCU | ||
1752 | p->rcu_blocked_node = NULL; | 1755 | p->rcu_blocked_node = NULL; |
1756 | #endif | ||
1753 | INIT_LIST_HEAD(&p->rcu_node_entry); | 1757 | INIT_LIST_HEAD(&p->rcu_node_entry); |
1754 | } | 1758 | } |
1755 | 1759 | ||