iter.iter.node = &output->node.node;
rcu_read_lock();
ret = lttng_ht_del(snapshot->output_ht, &iter);
rcu_read_unlock();
iter.iter.node = &output->node.node;
rcu_read_lock();
ret = lttng_ht_del(snapshot->output_ht, &iter);
rcu_read_unlock();
/*
* This is safe because the ownership of a snapshot object is in a session
* for which the session lock need to be acquired to read and modify it.
/*
* This is safe because the ownership of a snapshot object is in a session
* for which the session lock need to be acquired to read and modify it.
void snapshot_add_output(struct snapshot *snapshot,
struct snapshot_output *output)
{
void snapshot_add_output(struct snapshot *snapshot,
struct snapshot_output *output)
{
cds_lfht_for_each_entry(snapshot->output_ht->ht, &iter.iter, output,
node.node) {
cds_lfht_for_each_entry(snapshot->output_ht->ht, &iter.iter, output,
node.node) {
lttng_ht_lookup(snapshot->output_ht, (void *)((unsigned long) id), &iter);
node = lttng_ht_iter_get_node_ulong(&iter);
lttng_ht_lookup(snapshot->output_ht, (void *)((unsigned long) id), &iter);
node = lttng_ht_iter_get_node_ulong(&iter);