diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 22:50:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 22:50:03 -0400 |
commit | 20f3f3ca499d2c211771ba552685398b65d83859 (patch) | |
tree | 41b460196a0860e11d12e33e3172463973cb0078 /include/linux/sched.h | |
parent | 769f3e8c384795cc350e2aae27de2a12374d19d4 (diff) | |
parent | 41c51c98f588edcdf6141cff1895df738e03ddd4 (diff) |
Merge branch 'rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rcu: rcu_sched_grace_period(): kill the bogus flush_signals()
rculist: use list_entry_rcu in places where it's appropriate
rculist.h: introduce list_entry_rcu() and list_first_entry_rcu()
rcu: Update RCU tracing documentation for __rcu_pending
rcu: Add __rcu_pending tracing to hierarchical RCU
RCU: make treercu be default
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index dbb1043e8656..d4646ae300f0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -77,6 +77,7 @@ struct sched_param { | |||
77 | #include <linux/proportions.h> | 77 | #include <linux/proportions.h> |
78 | #include <linux/seccomp.h> | 78 | #include <linux/seccomp.h> |
79 | #include <linux/rcupdate.h> | 79 | #include <linux/rcupdate.h> |
80 | #include <linux/rculist.h> | ||
80 | #include <linux/rtmutex.h> | 81 | #include <linux/rtmutex.h> |
81 | 82 | ||
82 | #include <linux/time.h> | 83 | #include <linux/time.h> |
@@ -2030,7 +2031,8 @@ static inline unsigned long wait_task_inactive(struct task_struct *p, | |||
2030 | } | 2031 | } |
2031 | #endif | 2032 | #endif |
2032 | 2033 | ||
2033 | #define next_task(p) list_entry(rcu_dereference((p)->tasks.next), struct task_struct, tasks) | 2034 | #define next_task(p) \ |
2035 | list_entry_rcu((p)->tasks.next, struct task_struct, tasks) | ||
2034 | 2036 | ||
2035 | #define for_each_process(p) \ | 2037 | #define for_each_process(p) \ |
2036 | for (p = &init_task ; (p = next_task(p)) != &init_task ; ) | 2038 | for (p = &init_task ; (p = next_task(p)) != &init_task ; ) |
@@ -2069,8 +2071,8 @@ int same_thread_group(struct task_struct *p1, struct task_struct *p2) | |||
2069 | 2071 | ||
2070 | static inline struct task_struct *next_thread(const struct task_struct *p) | 2072 | static inline struct task_struct *next_thread(const struct task_struct *p) |
2071 | { | 2073 | { |
2072 | return list_entry(rcu_dereference(p->thread_group.next), | 2074 | return list_entry_rcu(p->thread_group.next, |
2073 | struct task_struct, thread_group); | 2075 | struct task_struct, thread_group); |
2074 | } | 2076 | } |
2075 | 2077 | ||
2076 | static inline int thread_group_empty(struct task_struct *p) | 2078 | static inline int thread_group_empty(struct task_struct *p) |