2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
7 #ifndef BABELTRACE2_TRACE_IR_EVENT_CLASS_H
8 #define BABELTRACE2_TRACE_IR_EVENT_CLASS_H
10 /* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
12 #ifndef __BT_IN_BABELTRACE_H
13 # error "Please include <babeltrace2/babeltrace.h> instead."
18 #include <babeltrace2/types.h>
25 @defgroup api-tir-ev-cls Event class
31 An <strong><em>event class</em></strong> is the class of \bt_p_ev,
32 which \bt_p_ev_msg contain:
34 @image html trace-structure.png
36 In the illustration above, notice that:
38 - A \bt_stream is a conceptual \ref api-msg-seq "sequence of messages",
39 some of which are \bt_p_ev_msg.
40 - An event message contains an \bt_ev.
41 - An event is an instance of an event class.
42 - The \ref api-tir-ev-prop-payload "payload field" of an event is an
43 instance of the \ref api-tir-ev-cls-prop-p-fc "payload field class"
44 which an event class contains.
46 An event class is a \ref api-tir "trace IR" metadata object.
48 An event class is a \ref api-fund-shared-object "shared object": get a
49 new reference with bt_event_class_get_ref() and put an existing
50 reference with bt_event_class_put_ref().
52 Some library functions \ref api-fund-freezing "freeze" event classes on
53 success. The documentation of those functions indicate this
56 The type of an event class is #bt_event_class.
58 A \bt_stream_cls contains event classes. All the event classes of a
59 given stream class have unique
60 \ref api-tir-ev-cls-prop-id "numeric IDs". Borrow the stream class
61 which contains an event class with bt_event_class_borrow_stream_class()
62 or bt_event_class_borrow_stream_class_const().
64 To create a default event class:
68 If bt_stream_class_assigns_automatic_event_class_id() returns
69 #BT_TRUE (the default) for the stream class to use
71 <dd>Use bt_event_class_create().</dd>
74 If bt_stream_class_assigns_automatic_event_class_id() returns
75 #BT_FALSE for the stream class to use
77 <dd>Use bt_event_class_create_with_id().</dd>
82 An event class has the following properties:
85 <dt>\anchor api-tir-ev-cls-prop-id Numeric ID</dt>
87 Numeric ID, unique amongst the numeric IDs of the event class's
88 \bt_stream_cls's event classes.
90 Depending on whether or not the event class's stream class
91 automatically assigns event class IDs
92 (see bt_stream_class_assigns_automatic_event_class_id()),
93 set the event class's numeric ID on creation with
94 bt_event_class_create() or
95 bt_event_class_create_with_id().
97 You cannot change the numeric ID once the event class is created.
99 Get an event class's numeric ID with bt_event_class_get_id().
102 <dt>\anchor api-tir-ev-cls-prop-name \bt_dt_opt Name</dt>
104 Name of the event class.
106 Use bt_event_class_set_name() and bt_event_class_get_name().
109 <dt>\anchor api-tir-ev-cls-prop-log-lvl \bt_dt_opt Log level</dt>
111 Log level of the event class.
113 The event class's log level corresponds to the log level of the
114 tracer's original instrumentation point.
116 Use bt_event_class_set_log_level() and
117 bt_event_class_get_log_level().
121 \anchor api-tir-ev-cls-prop-emf-uri
122 \bt_dt_opt Eclipse Modeling Framework (EMF) URI
125 EMF URI of the event class.
127 Use bt_event_class_set_emf_uri() and
128 bt_event_class_get_emf_uri().
132 \anchor api-tir-ev-cls-prop-p-fc
133 \bt_dt_opt Payload field class
136 Payload \bt_fc of the event class.
138 The payload of an event class instance (\bt_ev) contains the
141 Use bt_event_class_set_payload_field_class()
142 bt_event_class_borrow_payload_field_class(),
143 and bt_event_class_borrow_payload_field_class_const().
147 \anchor api-tir-ev-cls-prop-sc-fc
148 \bt_dt_opt Specific context field class
151 Specific context \bt_fc of the event class.
153 The specific context of an event class instance (\bt_ev) contains
154 any contextual data of which the layout is specific to the
155 event's class and which does not belong to the payload.
157 Use bt_event_class_set_specific_context_field_class()
158 bt_event_class_borrow_specific_context_field_class(),
159 and bt_event_class_borrow_specific_context_field_class_const().
163 \anchor api-tir-ev-cls-prop-user-attrs
164 \bt_dt_opt User attributes
167 User attributes of the event class.
169 User attributes are custom attributes attached to an event class.
171 Use bt_event_class_set_user_attributes(),
172 bt_event_class_borrow_user_attributes(), and
173 bt_event_class_borrow_user_attributes_const().
184 @typedef struct bt_event_class bt_event_class;
199 Creates a default event class and adds it to the \bt_stream_cls
204 Only use this function if
207 bt_stream_class_assigns_automatic_event_class_id(stream_class)
212 Otherwise, use bt_event_class_create_with_id().
215 On success, the returned event class has the following property values:
222 <td>\ref api-tir-ev-cls-prop-id "Numeric ID"
223 <td>Automatically assigned by \bt_p{stream_class}
225 <td>\ref api-tir-ev-cls-prop-name "Name"
228 <td>\ref api-tir-ev-cls-prop-log-lvl "Log level"
231 <td>\ref api-tir-ev-cls-prop-emf-uri "EMF URI"
234 <td>\ref api-tir-ev-cls-prop-p-fc "Payload field class"
237 <td>\ref api-tir-ev-cls-prop-sc-fc "Specific context field class"
240 <td>\ref api-tir-ev-cls-prop-user-attrs "User attributes"
241 <td>Empty \bt_map_val
244 @param[in] stream_class
245 Stream class to add the created event class to.
248 New event class reference, or \c NULL on memory error.
250 @bt_pre_not_null{stream_class}
252 <code>bt_stream_class_assigns_automatic_event_class_id(stream_class)</code>
255 @bt_post_success_frozen{stream_class}
257 @sa bt_event_class_create_with_id() —
258 Creates an event class with a specific numeric ID and adds it to a
261 extern bt_event_class
*bt_event_class_create(
262 bt_stream_class
*stream_class
);
266 Creates a default event class with the numeric ID \bt_p{id} and adds
267 it to the \bt_stream_cls \bt_p{stream_class}.
271 Only use this function if
274 bt_stream_class_assigns_automatic_event_class_id(stream_class)
279 Otherwise, use bt_event_class_create().
282 On success, the returned event class has the following property values:
289 <td>\ref api-tir-ev-cls-prop-id "Numeric ID"
292 <td>\ref api-tir-ev-cls-prop-name "Name"
295 <td>\ref api-tir-ev-cls-prop-log-lvl "Log level"
298 <td>\ref api-tir-ev-cls-prop-emf-uri "EMF URI"
301 <td>\ref api-tir-ev-cls-prop-p-fc "Payload field class"
304 <td>\ref api-tir-ev-cls-prop-sc-fc "Specific context field class"
307 <td>\ref api-tir-ev-cls-prop-user-attrs "User attributes"
308 <td>Empty \bt_map_val
311 @param[in] stream_class
312 Stream class to add the created event class to.
314 Numeric ID of the event class to create and add to
318 New event class reference, or \c NULL on memory error.
320 @bt_pre_not_null{stream_class}
322 <code>bt_stream_class_assigns_automatic_event_class_id(stream_class)</code>
325 \bt_p{stream_class} does not contain an event class with the numeric
328 @bt_post_success_frozen{stream_class}
330 @sa bt_event_class_create() —
331 Creates an event class with an automatic numeric ID and adds it to a
334 extern bt_event_class
*bt_event_class_create_with_id(
335 bt_stream_class
*stream_class
, uint64_t id
);
340 @name Stream class access
346 Borrows the \bt_stream_cls which contains the event class
349 @param[in] event_class
350 Event class from which to borrow the stream class which contains it.
353 Stream class which contains \bt_p{event_class}.
355 @bt_pre_not_null{event_class}
357 @sa bt_event_class_borrow_stream_class_const() —
358 \c const version of this function.
360 extern bt_stream_class
*bt_event_class_borrow_stream_class(
361 bt_event_class
*event_class
);
365 Borrows the \bt_stream_cls which contains the event class
366 \bt_p{event_class} (\c const version).
368 See bt_event_class_borrow_stream_class().
370 extern const bt_stream_class
*bt_event_class_borrow_stream_class_const(
371 const bt_event_class
*event_class
);
382 Returns the numeric ID of the event class \bt_p{event_class}.
384 See the \ref api-tir-ev-cls-prop-id "numeric ID" property.
386 @param[in] event_class
387 Event class of which to get the numeric ID.
390 Numeric ID of \bt_p{event_class}.
392 @bt_pre_not_null{event_class}
394 @sa bt_event_class_create_with_id() —
395 Creates an event class with a specific numeric ID and adds it to a
398 extern uint64_t bt_event_class_get_id(const bt_event_class
*event_class
);
402 Status codes for bt_event_class_set_name().
404 typedef enum bt_event_class_set_name_status
{
409 BT_EVENT_CLASS_SET_NAME_STATUS_OK
= __BT_FUNC_STATUS_OK
,
415 BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
416 } bt_event_class_set_name_status
;
420 Sets the name of the event class \bt_p{event_class} to
421 a copy of \bt_p{name}.
423 See the \ref api-tir-ev-cls-prop-name "name" property.
425 @param[in] event_class
426 Event class of which to set the name to \bt_p{name}.
428 New name of \bt_p{event_class} (copied).
430 @retval #BT_EVENT_CLASS_SET_NAME_STATUS_OK
432 @retval #BT_EVENT_CLASS_SET_NAME_STATUS_MEMORY_ERROR
435 @bt_pre_not_null{event_class}
436 @bt_pre_hot{event_class}
437 @bt_pre_not_null{name}
439 @sa bt_event_class_get_name() —
440 Returns the name of an event class.
442 extern bt_event_class_set_name_status
bt_event_class_set_name(
443 bt_event_class
*event_class
, const char *name
);
447 Returns the name of the event class \bt_p{event_class}.
449 See the \ref api-tir-ev-cls-prop-name "name" property.
451 If \bt_p{event_class} has no name, this function returns \c NULL.
453 @param[in] event_class
454 Event class of which to get the name.
458 Name of \bt_p{event_class}, or \c NULL if none.
460 The returned pointer remains valid as long as \bt_p{event_class}
464 @bt_pre_not_null{event_class}
466 @sa bt_event_class_set_name() —
467 Sets the name of an event class.
469 extern const char *bt_event_class_get_name(const bt_event_class
*event_class
);
473 Event class log level enumerators.
475 typedef enum bt_event_class_log_level
{
480 BT_EVENT_CLASS_LOG_LEVEL_EMERGENCY
= 0,
484 Action must be taken immediately.
486 BT_EVENT_CLASS_LOG_LEVEL_ALERT
= 1,
492 BT_EVENT_CLASS_LOG_LEVEL_CRITICAL
= 2,
498 BT_EVENT_CLASS_LOG_LEVEL_ERROR
= 3,
504 BT_EVENT_CLASS_LOG_LEVEL_WARNING
= 4,
508 Normal, but significant, condition.
510 BT_EVENT_CLASS_LOG_LEVEL_NOTICE
= 5,
514 Informational message.
516 BT_EVENT_CLASS_LOG_LEVEL_INFO
= 6,
520 Debugging information with system-level scope
523 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_SYSTEM
= 7,
527 Debugging information with program-level scope
530 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROGRAM
= 8,
534 Debugging information with process-level scope
537 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_PROCESS
= 9,
541 Debugging information with module (executable/library) scope
544 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_MODULE
= 10,
548 Debugging information with compilation unit scope
551 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_UNIT
= 11,
555 Debugging information with function-level scope.
557 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_FUNCTION
= 12,
561 Debugging information with function-level scope.
563 BT_EVENT_CLASS_LOG_LEVEL_DEBUG_LINE
= 13,
567 Debugging-level message.
569 BT_EVENT_CLASS_LOG_LEVEL_DEBUG
= 14,
570 } bt_event_class_log_level
;
574 Sets the log level of the event class \bt_p{event_class} to
577 See the \ref api-tir-ev-cls-prop-log-lvl "log level" property.
579 @param[in] event_class
580 Event class of which to set the log level to \bt_p{log_level}.
582 New log level of \bt_p{event_class}.
584 @bt_pre_not_null{event_class}
585 @bt_pre_hot{event_class}
587 @sa bt_event_class_get_log_level() —
588 Returns the log level of an event class.
590 extern void bt_event_class_set_log_level(bt_event_class
*event_class
,
591 bt_event_class_log_level log_level
);
595 Returns the log level of the event class \bt_p{event_class}.
597 See the \ref api-tir-ev-cls-prop-log-lvl "log level" property.
599 @param[in] event_class
600 Event class of which to get the log level.
601 @param[out] log_level
602 <strong>If this function returns
603 #BT_PROPERTY_AVAILABILITY_AVAILABLE</strong>, \bt_p{*log_level} is
604 the log level of \bt_p{event_class}.
606 @retval #BT_PROPERTY_AVAILABILITY_AVAILABLE
607 The log level of \bt_p{event_class} is available.
608 @retval #BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE
609 The log level of \bt_p{event_class} is not available.
611 @bt_pre_not_null{event_class}
612 @bt_pre_not_null{log_level}
614 @sa bt_event_class_set_log_level() —
615 Sets the log level of an event class.
617 extern bt_property_availability
bt_event_class_get_log_level(
618 const bt_event_class
*event_class
,
619 bt_event_class_log_level
*log_level
);
623 Status codes for bt_event_class_set_emf_uri().
625 typedef enum bt_event_class_set_emf_uri_status
{
630 BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK
= __BT_FUNC_STATUS_OK
,
636 BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
637 } bt_event_class_set_emf_uri_status
;
641 Sets the Eclipse Modeling Framework (EMF) URI of the event class
642 \bt_p{event_class} to a copy of \bt_p{emf_uri}.
644 See the \ref api-tir-ev-cls-prop-emf-uri "EMF URI" property.
646 @param[in] event_class
647 Event class of which to set the EMF URI to \bt_p{emf_uri}.
649 New EMF URI of \bt_p{event_class} (copied).
651 @retval #BT_EVENT_CLASS_SET_EMF_URI_STATUS_OK
653 @retval #BT_EVENT_CLASS_SET_EMF_URI_STATUS_MEMORY_ERROR
656 @bt_pre_not_null{event_class}
657 @bt_pre_hot{event_class}
658 @bt_pre_not_null{emf_uri}
660 @sa bt_event_class_get_emf_uri() —
661 Returns the EMF URI of an event class.
663 extern bt_event_class_set_emf_uri_status
bt_event_class_set_emf_uri(
664 bt_event_class
*event_class
, const char *emf_uri
);
668 Returns the Eclipse Modeling Framework (EMF) URI of the event
669 class \bt_p{event_class}.
671 See the \ref api-tir-ev-cls-prop-emf-uri "EMF URI" property.
673 If \bt_p{event_class} has no EMF URI, this function returns \c NULL.
675 @param[in] event_class
676 Event class of which to get the EMF URI.
680 EMF URI of \bt_p{event_class}, or \c NULL if none.
682 The returned pointer remains valid as long as \bt_p{event_class}
686 @bt_pre_not_null{event_class}
688 @sa bt_event_class_set_emf_uri() —
689 Sets the EMF URI of an event class.
691 extern const char *bt_event_class_get_emf_uri(
692 const bt_event_class
*event_class
);
696 Status codes for bt_event_class_set_payload_field_class() and
697 bt_event_class_set_specific_context_field_class().
699 typedef enum bt_event_class_set_field_class_status
{
704 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
= __BT_FUNC_STATUS_OK
,
710 BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
= __BT_FUNC_STATUS_MEMORY_ERROR
,
711 } bt_event_class_set_field_class_status
;
715 Sets the payload \bt_fc of the event class
716 \bt_p{event_class} to \bt_p{field_class}.
718 See the \ref api-tir-ev-cls-prop-p-fc "payload field class" property.
720 @param[in] event_class
721 Event class of which to set the payload field class to
723 @param[in] field_class
724 New payload field class of \bt_p{event_class}.
726 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
728 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
731 @bt_pre_not_null{event_class}
732 @bt_pre_hot{event_class}
733 @bt_pre_not_null{field_class}
734 @bt_pre_is_struct_fc{field_class}
736 \bt_p{field_class}, or any of its contained field classes,
737 is not already part of a \bt_stream_cls or of an event class.
739 If any of the field classes recursively contained in
740 \bt_p{field_class} has a
741 \ref api-tir-fc-link "link to another field class", it must honor
742 the field class link rules.
744 @bt_post_success_frozen{field_class}
746 @sa bt_event_class_borrow_payload_field_class() —
747 Borrows the payload field class of an event class.
748 @sa bt_event_class_borrow_payload_field_class_const() —
749 Borrows the payload field class of an event class
752 extern bt_event_class_set_field_class_status
753 bt_event_class_set_payload_field_class(bt_event_class
*event_class
,
754 bt_field_class
*field_class
);
758 Borrows the payload \bt_fc from the event class \bt_p{event_class}.
760 See the \ref api-tir-ev-cls-prop-p-fc "payload field class" property.
762 If \bt_p{event_class} has no payload field class, this function
765 @param[in] event_class
766 Event class from which to borrow the payload field class.
769 \em Borrowed reference of the payload field class of
770 \bt_p{event_class}, or \c NULL if none.
772 @bt_pre_not_null{event_class}
774 @sa bt_event_class_set_payload_field_class() —
775 Sets the payload field class of an event class.
776 @sa bt_event_class_borrow_payload_field_class_const() —
777 \c const version of this function.
779 extern bt_field_class
*bt_event_class_borrow_payload_field_class(
780 bt_event_class
*event_class
);
784 Borrows the payload \bt_fc from the event class \bt_p{event_class}
787 See bt_event_class_borrow_payload_field_class().
789 extern const bt_field_class
*bt_event_class_borrow_payload_field_class_const(
790 const bt_event_class
*event_class
);
794 Sets the specific context \bt_fc of the event class
795 \bt_p{event_class} to \bt_p{field_class}.
797 See the \ref api-tir-ev-cls-prop-sc-fc "specific context field class"
800 @param[in] event_class
801 Event class of which to set the specific context field class to
803 @param[in] field_class
804 New specific context field class of \bt_p{event_class}.
806 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_OK
808 @retval #BT_EVENT_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR
811 @bt_pre_not_null{event_class}
812 @bt_pre_hot{event_class}
813 @bt_pre_not_null{field_class}
814 @bt_pre_is_struct_fc{field_class}
816 \bt_p{field_class}, or any of its contained field classes,
817 is not already part of a \bt_stream_cls or of an event class.
819 If any of the field classes recursively contained in
820 \bt_p{field_class} has a
821 \ref api-tir-fc-link "link to another field class", it must honor
822 the field class link rules.
824 @bt_post_success_frozen{field_class}
826 @sa bt_event_class_borrow_specific_context_field_class() —
827 Borrows the specific context field class of an event class.
828 @sa bt_event_class_borrow_specific_context_field_class_const() —
829 Borrows the specific context field class of an event class
832 extern bt_event_class_set_field_class_status
833 bt_event_class_set_specific_context_field_class(bt_event_class
*event_class
,
834 bt_field_class
*field_class
);
838 Borrows the specific context \bt_fc from the event class
841 See the \ref api-tir-ev-cls-prop-sc-fc "specific context field class"
844 If \bt_p{event_class} has no specific context field class, this function
847 @param[in] event_class
848 Event class from which to borrow the specific context field class.
851 \em Borrowed reference of the specific context field class of
852 \bt_p{event_class}, or \c NULL if none.
854 @bt_pre_not_null{event_class}
856 @sa bt_event_class_set_specific_context_field_class() —
857 Sets the specific context field class of an event class.
858 @sa bt_event_class_borrow_specific_context_field_class_const() —
859 \c const version of this function.
861 extern bt_field_class
*
862 bt_event_class_borrow_specific_context_field_class(bt_event_class
*event_class
);
866 Borrows the specific context \bt_fc from the event class
867 \bt_p{event_class} (\c const version).
869 See bt_event_class_borrow_specific_context_field_class().
871 extern const bt_field_class
*
872 bt_event_class_borrow_specific_context_field_class_const(
873 const bt_event_class
*event_class
);
877 Sets the user attributes of the event class \bt_p{event_class} to
878 \bt_p{user_attributes}.
880 See the \ref api-tir-ev-cls-prop-user-attrs "user attributes" property.
883 When you create a default event class with bt_event_class_create()
884 or bt_event_class_create_with_id(), the event class's initial user
885 attributes is an empty \bt_map_val. Therefore you can borrow it with
886 bt_event_class_borrow_user_attributes() and fill it directly instead
887 of setting a new one with this function.
889 @param[in] event_class
890 Event class of which to set the user attributes to
891 \bt_p{user_attributes}.
892 @param[in] user_attributes
893 New user attributes of \bt_p{event_class}.
895 @bt_pre_not_null{event_class}
896 @bt_pre_hot{event_class}
897 @bt_pre_not_null{user_attributes}
898 @bt_pre_is_map_val{user_attributes}
900 @sa bt_event_class_borrow_user_attributes() —
901 Borrows the user attributes of an event class.
903 extern void bt_event_class_set_user_attributes(
904 bt_event_class
*event_class
, const bt_value
*user_attributes
);
908 Borrows the user attributes of the event class \bt_p{event_class}.
910 See the \ref api-tir-ev-cls-prop-user-attrs "user attributes" property.
913 When you create a default event class with bt_event_class_create()
914 or bt_event_class_create_with_id(), the event class's initial user
915 attributes is an empty \bt_map_val.
917 @param[in] event_class
918 Event class from which to borrow the user attributes.
921 User attributes of \bt_p{event_class} (a \bt_map_val).
923 @bt_pre_not_null{event_class}
925 @sa bt_event_class_set_user_attributes() —
926 Sets the user attributes of an event class.
927 @sa bt_event_class_borrow_user_attributes_const() —
928 \c const version of this function.
930 extern bt_value
*bt_event_class_borrow_user_attributes(
931 bt_event_class
*event_class
);
935 Borrows the user attributes of the event class \bt_p{event_class}
938 See bt_event_class_borrow_user_attributes().
940 extern const bt_value
*bt_event_class_borrow_user_attributes_const(
941 const bt_event_class
*event_class
);
946 @name Reference count
952 Increments the \ref api-fund-shared-object "reference count" of
953 the event class \bt_p{event_class}.
955 @param[in] event_class
957 Event class of which to increment the reference count.
962 @sa bt_event_class_put_ref() —
963 Decrements the reference count of an event class.
965 extern void bt_event_class_get_ref(const bt_event_class
*event_class
);
969 Decrements the \ref api-fund-shared-object "reference count" of
970 the event class \bt_p{event_class}.
972 @param[in] event_class
974 Event class of which to decrement the reference count.
979 @sa bt_event_class_get_ref() —
980 Increments the reference count of an event class.
982 extern void bt_event_class_put_ref(const bt_event_class
*event_class
);
986 Decrements the reference count of the event class
987 \bt_p{_event_class}, and then sets \bt_p{_event_class} to \c NULL.
991 Event class of which to decrement the reference count.
996 @bt_pre_assign_expr{_event_class}
998 #define BT_EVENT_CLASS_PUT_REF_AND_RESET(_event_class) \
1000 bt_event_class_put_ref(_event_class); \
1001 (_event_class) = NULL; \
1006 Decrements the reference count of the event class \bt_p{_dst}, sets
1007 \bt_p{_dst} to \bt_p{_src}, and then sets \bt_p{_src} to \c NULL.
1009 This macro effectively moves an event class reference from the expression
1010 \bt_p{_src} to the expression \bt_p{_dst}, putting the existing
1011 \bt_p{_dst} reference.
1015 Destination expression.
1017 Can contain \c NULL.
1023 Can contain \c NULL.
1026 @bt_pre_assign_expr{_dst}
1027 @bt_pre_assign_expr{_src}
1029 #define BT_EVENT_CLASS_MOVE_REF(_dst, _src) \
1031 bt_event_class_put_ref(_dst); \
1044 #endif /* BABELTRACE2_TRACE_IR_EVENT_CLASS_H */