[PATCH] Reinstate const in next_thread()
authorKeith Owens <kaos@sgi.com>
Tue, 11 Apr 2006 05:54:07 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:41 +0000 (06:18 -0700)
Before commit 47e65328a7b1cdfc4e3102e50d60faf94ebba7d3, next_thread() took
a const task_t.  Reinstate the const qualifier, getting the next thread
never changes the current thread.

Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/sched.h

index a3e4f6b503a33426630d07d98ec636fa9dce9f92..83d657811d016a7e07766cd2e0a8d7d7b0715a5e 100644 (file)
@@ -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 */
 #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),
                                task_t, thread_group);