|
@@ -53,7 +53,7 @@ struct thread *thread__new(pid_t pid, pid_t tid)
|
|
|
goto err_thread;
|
|
|
|
|
|
list_add(&comm->list, &thread->comm_list);
|
|
|
- atomic_set(&thread->refcnt, 1);
|
|
|
+ refcount_set(&thread->refcnt, 1);
|
|
|
RB_CLEAR_NODE(&thread->rb_node);
|
|
|
}
|
|
|
|
|
@@ -88,13 +88,13 @@ void thread__delete(struct thread *thread)
|
|
|
struct thread *thread__get(struct thread *thread)
|
|
|
{
|
|
|
if (thread)
|
|
|
- atomic_inc(&thread->refcnt);
|
|
|
+ refcount_inc(&thread->refcnt);
|
|
|
return thread;
|
|
|
}
|
|
|
|
|
|
void thread__put(struct thread *thread)
|
|
|
{
|
|
|
- if (thread && atomic_dec_and_test(&thread->refcnt)) {
|
|
|
+ if (thread && refcount_dec_and_test(&thread->refcnt)) {
|
|
|
/*
|
|
|
* Remove it from the dead_threads list, as last reference
|
|
|
* is gone.
|