ir: move writer-specific declarations to writer header
[babeltrace.git] / include / babeltrace / ctf-writer / clock.h
index 507739b01c24c5e1ec9887a99767e1cc33bad74f..cb17ca2b0f2e0c529717aa4b4b8f5efa27e56c6d 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_CLOCK_H
+#define BABELTRACE_CTF_WRITER_CLOCK_H
+
 /*
  * BabelTrace - CTF Writer: Clock
  *
  */
 
 #include <babeltrace/ctf-ir/clock.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_clock_get and bt_ctf_clock_put: increment and decrement the
+ * refcount of the clock
+ *
+ * You may also use bt_ctf_get() and bt_ctf_put() with clock objects.
+ *
+ * These functions ensure that the clock won't be destroyed when it
+ * is in use. The same number of get and put (plus one extra put to
+ * release the initial reference done at creation) has to be done to
+ * destroy a clock.
+ *
+ * When the clock refcount is decremented to 0 by a bt_ctf_clock_put,
+ * the clock is freed.
+ *
+ * @param clock Clock instance.
+ */
+extern void bt_ctf_clock_get(struct bt_ctf_clock *clock);
+extern void bt_ctf_clock_put(struct bt_ctf_clock *clock);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_CLOCK_H */
This page took 0.023922 seconds and 4 git commands to generate.