Skip to content

Commit

Permalink
[PATCH] remove get_task_struct_rcu()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul E. McKenney authored and Linus Torvalds committed Jan 9, 2006
1 parent 2d89c92 commit d4829cd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d4829cd

Please sign in to comment.