2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_CTF_WRITER_EVENT_TYPES_H
8 #define BABELTRACE2_CTF_WRITER_EVENT_TYPES_H
10 #include <babeltrace2-ctf-writer/object.h>
11 #include <babeltrace2-ctf-writer/field-types.h>
18 * bt_ctf_field_type_get and bt_ctf_field_type_put: increment and decrement
19 * the field type's reference count.
21 * You may also use bt_ctf_object_get_ref() and bt_ctf_object_put_ref() with field type objects.
23 * These functions ensure that the field type won't be destroyed while it
24 * is in use. The same number of get and put (plus one extra put to
25 * release the initial reference done at creation) have to be done to
26 * destroy a field type.
28 * When the field type's reference count is decremented to 0 by a
29 * bt_ctf_field_type_put, the field type is freed.
31 * @param type Field type.
34 /* Pre-2.0 CTF writer compatibility */
36 void bt_ctf_field_type_get(struct bt_ctf_field_type
*type
)
38 bt_ctf_object_get_ref(type
);
41 /* Pre-2.0 CTF writer compatibility */
43 void bt_ctf_field_type_put(struct bt_ctf_field_type
*type
)
45 bt_ctf_object_put_ref(type
);
52 #endif /* BABELTRACE2_CTF_WRITER_EVENT_TYPES_H */
This page took 0.03044 seconds and 4 git commands to generate.