#include "buffer-registry.h"
#include "trace-ust.h"
+#include "utils.h"
/*
* Match function for the events hash table lookup.
return lus;
error_consumer:
- lttng_ht_destroy(lus->domain_global.channels);
+ ht_cleanup_push(lus->domain_global.channels);
free(lus);
error:
return NULL;
}
rcu_read_unlock();
- lttng_ht_destroy(ht);
+ ht_cleanup_push(ht);
}
/*
}
rcu_read_unlock();
- lttng_ht_destroy(events);
+ ht_cleanup_push(events);
}
/*
call_rcu(&channel->node.head, destroy_channel_rcu);
}
+/*
+ * Remove an UST channel from a channel HT.
+ */
+void trace_ust_delete_channel(struct lttng_ht *ht,
+ struct ltt_ust_channel *channel)
+{
+ int ret;
+ struct lttng_ht_iter iter;
+
+ assert(ht);
+ assert(channel);
+
+ iter.iter.node = &channel->node.node;
+ ret = lttng_ht_del(ht, &iter);
+ assert(!ret);
+}
+
/*
* Cleanup ust metadata structure.
*/
}
rcu_read_unlock();
- lttng_ht_destroy(channels);
+ ht_cleanup_push(channels);
}
/*