Version 2.0.6
[lttng-ust.git] / liblttng-ust / ust-core.c
index 404e0b26997bc37ec356355c23d24a4fe3191ce5..7c17a76612297a0afc0ce3e468d79fbfbaa8d733 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <lttng/usterr-signal-safe.h>
 #include <stdlib.h>
+#include <lttng/ust-events.h>
+#include <usterr-signal-safe.h>
 
-volatile enum ust_loglevel ust_loglevel;
+static CDS_LIST_HEAD(ltt_transport_list);
 
 void init_usterr(void)
 {
@@ -35,3 +36,36 @@ void init_usterr(void)
                        ust_loglevel = UST_LOGLEVEL_NORMAL;
        }
 }
+
+struct ltt_transport *ltt_transport_find(const char *name)
+{
+       struct ltt_transport *transport;
+
+       cds_list_for_each_entry(transport, &ltt_transport_list, node) {
+               if (!strcmp(transport->name, name))
+                       return transport;
+       }
+       return NULL;
+}
+
+/**
+ * ltt_transport_register - LTT transport registration
+ * @transport: transport structure
+ *
+ * Registers a transport which can be used as output to extract the data out of
+ * LTTng. Called with ust_lock held.
+ */
+void ltt_transport_register(struct ltt_transport *transport)
+{
+       cds_list_add_tail(&transport->node, &ltt_transport_list);
+}
+
+/**
+ * ltt_transport_unregister - LTT transport unregistration
+ * @transport: transport structure
+ * Called with ust_lock held.
+ */
+void ltt_transport_unregister(struct ltt_transport *transport)
+{
+       cds_list_del(&transport->node);
+}
This page took 0.024193 seconds and 4 git commands to generate.