|
@@ -1109,7 +1109,7 @@ struct dso *dso__new(const char *name)
|
|
|
INIT_LIST_HEAD(&dso->node);
|
|
|
INIT_LIST_HEAD(&dso->data.open_entry);
|
|
|
pthread_mutex_init(&dso->lock, NULL);
|
|
|
- atomic_set(&dso->refcnt, 1);
|
|
|
+ refcount_set(&dso->refcnt, 1);
|
|
|
}
|
|
|
|
|
|
return dso;
|
|
@@ -1147,13 +1147,13 @@ void dso__delete(struct dso *dso)
|
|
|
struct dso *dso__get(struct dso *dso)
|
|
|
{
|
|
|
if (dso)
|
|
|
- atomic_inc(&dso->refcnt);
|
|
|
+ refcount_inc(&dso->refcnt);
|
|
|
return dso;
|
|
|
}
|
|
|
|
|
|
void dso__put(struct dso *dso)
|
|
|
{
|
|
|
- if (dso && atomic_dec_and_test(&dso->refcnt))
|
|
|
+ if (dso && refcount_dec_and_test(&dso->refcnt))
|
|
|
dso__delete(dso);
|
|
|
}
|
|
|
|