Commit a9cdf410 authored by Keith Owens's avatar Keith Owens Committed by Linus Torvalds

[PATCH] Reinstate const in next_thread()

Before commit 47e65328, next_thread() took
a const task_t.  Reinstate the const qualifier, getting the next thread
never changes the current thread.
Signed-off-by: default avatarKeith Owens <kaos@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 49b6e2ad
...@@ -1206,7 +1206,7 @@ extern void wait_task_inactive(task_t * p); ...@@ -1206,7 +1206,7 @@ extern void wait_task_inactive(task_t * p);
/* de_thread depends on thread_group_leader not being a pid based check */ /* de_thread depends on thread_group_leader not being a pid based check */
#define thread_group_leader(p) (p == p->group_leader) #define thread_group_leader(p) (p == p->group_leader)
static inline task_t *next_thread(task_t *p) static inline task_t *next_thread(const task_t *p)
{ {
return list_entry(rcu_dereference(p->thread_group.next), return list_entry(rcu_dereference(p->thread_group.next),
task_t, thread_group); task_t, thread_group);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment