[patch 2.6.17-rc1] Reinstate const in next_thread()

From: Keith Owens
Date: Mon Apr 03 2006 - 04:25:51 EST


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@xxxxxxx>

Index: linux/include/linux/sched.h
===================================================================
--- linux.orig/include/linux/sched.h 2006-04-03 18:20:22.000000000 +1000
+++ linux/include/linux/sched.h 2006-04-03 18:20:36.309150547 +1000
@@ -1205,7 +1205,7 @@ extern void wait_task_inactive(task_t *

#define thread_group_leader(p) (p->pid == p->tgid)

-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);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/