Rename bt_ctf_X -> bt_X, maintain backward compat. for pre-2.0 CTF writer
[babeltrace.git] / include / babeltrace / ctf-writer / event-fields.h
index 3ab3e39fffa9f6a9bee82a76df8b1c98bb4530d1..f4b8216df3be92699b2d137f64b3b4b79dbbf080 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef BABELTRACE_CTF_WRITER_EVENT_FIELDS_H
+#define BABELTRACE_CTF_WRITER_EVENT_FIELDS_H
+
 /*
  * BabelTrace - CTF Writer: Event Fields
  *
  */
 
 #include <babeltrace/ctf-ir/fields.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * bt_ctf_field_get and bt_ctf_field_put: increment and decrement the
+ * field's reference count.
+ *
+ * You may also use bt_get() and bt_put() with field objects.
+ *
+ * These functions ensure that the field 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) have to be done to
+ * destroy a field.
+ *
+ * When the field's reference count is decremented to 0 by a bt_ctf_field_put,
+ * the field is freed.
+ *
+ * @param field Field instance.
+ */
+extern void bt_ctf_field_get(struct bt_field *field);
+extern void bt_ctf_field_put(struct bt_field *field);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_CTF_WRITER_EVENT_FIELDS_H */
This page took 0.023218 seconds and 4 git commands to generate.