]> err.no Git - linux-2.6/commitdiff
[PATCH] remove get_task_struct_rcu()
authorPaul E. McKenney <paulmck@us.ibm.com>
Sun, 8 Jan 2006 09:01:39 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:40 +0000 (20:13 -0800)
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" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/sched.h

index a6af77e9b4cf955a606a1925594227db89407cd6..20bd70749104395fdd21d28445e46580c4217d11 100644 (file)
@@ -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)