projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
convert to uatomic ops
[ust.git]
/
libust
/
channels.c
diff --git
a/libust/channels.c
b/libust/channels.c
index c90733cbbc863061684adb6495bfec232736d8e7..b7f35439a86e189413e7fa8ef81374c30a945d12 100644
(file)
--- a/
libust/channels.c
+++ b/
libust/channels.c
@@
-72,8
+72,8
@@
static void release_channel_setting(struct kref *kref)
struct ltt_channel_setting, kref);
struct ltt_channel_setting *iter;
struct ltt_channel_setting, kref);
struct ltt_channel_setting *iter;
- if (atomic_read(&index_kref.refcount) == 0
- && atomic_read(&setting->kref.refcount) == 0) {
+ if (
u
atomic_read(&index_kref.refcount) == 0
+ &&
u
atomic_read(&setting->kref.refcount) == 0) {
list_del(&setting->list);
kfree(setting);
list_del(&setting->list);
kfree(setting);
@@
-113,7
+113,7
@@
int ltt_channels_register(const char *name)
mutex_lock(<t_channel_mutex);
setting = lookup_channel(name);
if (setting) {
mutex_lock(<t_channel_mutex);
setting = lookup_channel(name);
if (setting) {
- if (atomic_read(&setting->kref.refcount) == 0)
+ if (
u
atomic_read(&setting->kref.refcount) == 0)
goto init_kref;
else {
kref_get(&setting->kref);
goto init_kref;
else {
kref_get(&setting->kref);
@@
-149,7
+149,7
@@
int ltt_channels_unregister(const char *name)
mutex_lock(<t_channel_mutex);
setting = lookup_channel(name);
mutex_lock(<t_channel_mutex);
setting = lookup_channel(name);
- if (!setting || atomic_read(&setting->kref.refcount) == 0) {
+ if (!setting ||
u
atomic_read(&setting->kref.refcount) == 0) {
ret = -ENOENT;
goto end;
}
ret = -ENOENT;
goto end;
}
@@
-175,7
+175,7
@@
int ltt_channels_set_default(const char *name,
mutex_lock(<t_channel_mutex);
setting = lookup_channel(name);
mutex_lock(<t_channel_mutex);
setting = lookup_channel(name);
- if (!setting || atomic_read(&setting->kref.refcount) == 0) {
+ if (!setting ||
u
atomic_read(&setting->kref.refcount) == 0) {
ret = -ENOENT;
goto end;
}
ret = -ENOENT;
goto end;
}
@@
-199,7
+199,7
@@
const char *ltt_channels_get_name_from_index(unsigned int index)
struct ltt_channel_setting *iter;
list_for_each_entry(iter, <t_channels, list)
struct ltt_channel_setting *iter;
list_for_each_entry(iter, <t_channels, list)
- if (iter->index == index && atomic_read(&iter->kref.refcount))
+ if (iter->index == index &&
u
atomic_read(&iter->kref.refcount))
return iter->name;
return NULL;
}
return iter->name;
return NULL;
}
@@
-212,7
+212,7
@@
ltt_channels_get_setting_from_name(const char *name)
list_for_each_entry(iter, <t_channels, list)
if (!strcmp(iter->name, name)
list_for_each_entry(iter, <t_channels, list)
if (!strcmp(iter->name, name)
- && atomic_read(&iter->kref.refcount))
+ &&
u
atomic_read(&iter->kref.refcount))
return iter;
return NULL;
}
return iter;
return NULL;
}
@@
-259,7
+259,7
@@
struct ust_channel *ltt_channels_trace_alloc(unsigned int *nr_channels,
WARN("ltt_channels_trace_alloc: no free_index; are there any probes connected?");
goto end;
}
WARN("ltt_channels_trace_alloc: no free_index; are there any probes connected?");
goto end;
}
- if (!atomic_read(&index_kref.refcount))
+ if (!
u
atomic_read(&index_kref.refcount))
kref_init(&index_kref);
else
kref_get(&index_kref);
kref_init(&index_kref);
else
kref_get(&index_kref);
@@
-271,7
+271,7
@@
struct ust_channel *ltt_channels_trace_alloc(unsigned int *nr_channels,
goto end;
}
list_for_each_entry(iter, <t_channels, list) {
goto end;
}
list_for_each_entry(iter, <t_channels, list) {
- if (!atomic_read(&iter->kref.refcount))
+ if (!
u
atomic_read(&iter->kref.refcount))
continue;
channel[iter->index].subbuf_size = iter->subbuf_size;
channel[iter->index].subbuf_cnt = iter->subbuf_cnt;
continue;
channel[iter->index].subbuf_size = iter->subbuf_size;
channel[iter->index].subbuf_cnt = iter->subbuf_cnt;
This page took
0.024528 seconds
and
4
git commands to generate.