From: Paul E. McKenney Date: Sun, 8 Jan 2006 09:01:39 +0000 (-0800) Subject: [PATCH] remove get_task_struct_rcu() X-Git-Tag: v2.6.16-rc1~839 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d4829cd5b4bd1ea58ba1bebad44d562f4027c290;p=linux-2.6-omap-h63xx.git [PATCH] remove get_task_struct_rcu() The latest set of signal-RCU patches does not use get_task_struct_rcu(). Attached is a patch that removes it. Signed-off-by: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/sched.h b/include/linux/sched.h index a6af77e9b4c..20bd7074910 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -878,18 +878,6 @@ extern void free_task(struct task_struct *tsk); extern void __put_task_struct(struct task_struct *tsk); #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) -static inline int get_task_struct_rcu(struct task_struct *t) -{ - int oldusage; - - do { - oldusage = atomic_read(&t->usage); - if (oldusage == 0) - return 0; - } while (cmpxchg(&t->usage.counter, oldusage, oldusage+1) != oldusage); - return 1; -} - extern void __put_task_struct_cb(struct rcu_head *rhp); static inline void put_task_struct(struct task_struct *t)