#include <common/error.hpp>
#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/urcu.hpp>
#include <stdio.h>
#include <unistd.h>
LTTNG_ASSERT(ctx);
LTTNG_ASSERT(channel_name);
- rcu_read_lock();
+ lttng::urcu::read_lock_guard read_lock;
chan_ht = usess->domain_global.channels;
/* Add ctx to channel */
ret = add_uctx_to_channel(usess, domain, uchan, ctx);
} else {
- rcu_read_lock();
/* Add ctx all events, all channels */
cds_lfht_for_each_entry (chan_ht->ht, &iter.iter, uchan, node.node) {
ret = add_uctx_to_channel(usess, domain, uchan, ctx);
continue;
}
}
- rcu_read_unlock();
}
switch (ret) {
}
error:
- rcu_read_unlock();
return ret;
}