static DEFINE_MUTEX(sessions_mutex);
static struct kmem_cache *event_cache;
+static void _ltt_event_destroy(struct ltt_event *event);
+static int _ltt_event_unregister(struct ltt_event *event);
static
int _ltt_event_metadata_statedump(struct ltt_session *session,
struct ltt_channel *chan,
return ret;
}
+/*
+ * Used when an event FD is released.
+ */
+int ltt_event_unregister(struct ltt_event *event)
+{
+ int ret;
+
+ mutex_lock(&sessions_mutex);
+ ret = ltt_event_unregister(event);
+ mutex_unlock(&sessions_mutex);
+ return ret;
+}
+
/*
* Only used internally at session destruction.
*/
+static
void _ltt_event_destroy(struct ltt_event *event)
{
ltt_event_put(event->desc);
enum instrum_type itype,
const struct lttng_event_desc *event_desc,
void *filter);
-int _ltt_event_unregister(struct ltt_event *event);
-void _ltt_event_destroy(struct ltt_event *event);
+int ltt_event_unregister(struct ltt_event *event);
void ltt_transport_register(struct ltt_transport *transport);
void ltt_transport_unregister(struct ltt_transport *transport);