提交 d4829cd5 编写于 作者: P Paul E. McKenney 提交者: Linus Torvalds

[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: N"Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 2d89c929
...@@ -878,18 +878,6 @@ extern void free_task(struct task_struct *tsk); ...@@ -878,18 +878,6 @@ extern void free_task(struct task_struct *tsk);
extern void __put_task_struct(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) #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); extern void __put_task_struct_cb(struct rcu_head *rhp);
static inline void put_task_struct(struct task_struct *t) static inline void put_task_struct(struct task_struct *t)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册