diff options
author | Paul E. McKenney <paulmck@us.ibm.com> | 2006-01-08 04:01:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:40 -0500 |
commit | d4829cd5b4bd1ea58ba1bebad44d562f4027c290 (patch) | |
tree | c60f85fdb0233d7a8574b203aeac96d7570c583f /include/linux | |
parent | 2d89c929078588aa9b9c674ef03ee9aa816b59b8 (diff) |
[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" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sched.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index a6af77e9b4cf..20bd70749104 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -878,18 +878,6 @@ extern void free_task(struct task_struct *tsk); | |||
878 | extern void __put_task_struct(struct task_struct *tsk); | 878 | extern void __put_task_struct(struct task_struct *tsk); |
879 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 879 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
880 | 880 | ||
881 | static inline int get_task_struct_rcu(struct task_struct *t) | ||
882 | { | ||
883 | int oldusage; | ||
884 | |||
885 | do { | ||
886 | oldusage = atomic_read(&t->usage); | ||
887 | if (oldusage == 0) | ||
888 | return 0; | ||
889 | } while (cmpxchg(&t->usage.counter, oldusage, oldusage+1) != oldusage); | ||
890 | return 1; | ||
891 | } | ||
892 | |||
893 | extern void __put_task_struct_cb(struct rcu_head *rhp); | 881 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
894 | 882 | ||
895 | static inline void put_task_struct(struct task_struct *t) | 883 | static inline void put_task_struct(struct task_struct *t) |