Commit | Line | Data |
---|---|---|
272df73e | 1 | /* |
0235b0db MJ |
2 | * SPDX-License-Identifier: MIT |
3 | * | |
e2f7325d | 4 | * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com> |
272df73e | 5 | * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
272df73e PP |
6 | */ |
7 | ||
350ad6c1 | 8 | #define BT_LOG_TAG "LIB/EVENT-CLASS" |
c2d9d9cf | 9 | #include "lib/logging.h" |
f8b979f9 | 10 | |
d98421f2 | 11 | #include "lib/assert-cond.h" |
3fadfbc0 | 12 | #include <babeltrace2/trace-ir/field-class.h> |
3fadfbc0 | 13 | #include <babeltrace2/trace-ir/event-class.h> |
3fadfbc0 | 14 | #include <babeltrace2/trace-ir/stream-class.h> |
578e048b MJ |
15 | #include "compat/compiler.h" |
16 | #include "compat/endian.h" | |
3fadfbc0 | 17 | #include <babeltrace2/types.h> |
578e048b MJ |
18 | #include "lib/value.h" |
19 | #include "common/assert.h" | |
dc3fffef | 20 | #include <inttypes.h> |
c4f23e30 | 21 | #include <stdbool.h> |
0fbb9a9f | 22 | #include <stdlib.h> |
272df73e | 23 | |
578e048b MJ |
24 | #include "attributes.h" |
25 | #include "clock-snapshot.h" | |
26 | #include "event-class.h" | |
27 | #include "event.h" | |
28 | #include "field-class.h" | |
29 | #include "field.h" | |
30 | #include "resolve-field-path.h" | |
31 | #include "stream-class.h" | |
32 | #include "trace.h" | |
33 | #include "utils.h" | |
d24d5663 | 34 | #include "lib/func-status.h" |
578e048b | 35 | |
d5b13b9b | 36 | #define BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(_ec) \ |
bdb288b3 | 37 | BT_ASSERT_PRE_DEV_HOT(((const struct bt_event_class *) (_ec)), \ |
e5be10ef | 38 | "Event class", ": %!+E", (_ec)) |
44c440bc PP |
39 | |
40 | static | |
41 | void destroy_event_class(struct bt_object *obj) | |
272df73e | 42 | { |
44c440bc | 43 | struct bt_event_class *event_class = (void *) obj; |
272df73e | 44 | |
44c440bc | 45 | BT_LIB_LOGD("Destroying event class: %!+E", event_class); |
c6962c96 | 46 | BT_OBJECT_PUT_REF_AND_RESET(event_class->user_attributes); |
f8b979f9 | 47 | |
44c440bc PP |
48 | if (event_class->name.str) { |
49 | g_string_free(event_class->name.str, TRUE); | |
238b7404 | 50 | event_class->name.str = NULL; |
cf76ce92 PP |
51 | } |
52 | ||
44c440bc PP |
53 | if (event_class->emf_uri.str) { |
54 | g_string_free(event_class->emf_uri.str, TRUE); | |
238b7404 | 55 | event_class->emf_uri.str = NULL; |
272df73e PP |
56 | } |
57 | ||
e6276565 | 58 | BT_LOGD_STR("Putting context field class."); |
238b7404 | 59 | BT_OBJECT_PUT_REF_AND_RESET(event_class->specific_context_fc); |
e6276565 | 60 | BT_LOGD_STR("Putting payload field class."); |
238b7404 | 61 | BT_OBJECT_PUT_REF_AND_RESET(event_class->payload_fc); |
312c056a | 62 | bt_object_pool_finalize(&event_class->event_pool); |
3dca2276 | 63 | g_free(obj); |
272df73e PP |
64 | } |
65 | ||
312c056a PP |
66 | static |
67 | void free_event(struct bt_event *event, | |
68 | struct bt_event_class *event_class) | |
69 | { | |
70 | bt_event_destroy(event); | |
71 | } | |
72 | ||
44c440bc | 73 | static |
40f4ba76 PP |
74 | bool event_class_id_is_unique(const struct bt_stream_class *stream_class, |
75 | uint64_t id) | |
272df73e | 76 | { |
44c440bc PP |
77 | uint64_t i; |
78 | bool is_unique = true; | |
272df73e | 79 | |
44c440bc | 80 | for (i = 0; i < stream_class->event_classes->len; i++) { |
40f4ba76 | 81 | const struct bt_event_class *ec = |
44c440bc PP |
82 | stream_class->event_classes->pdata[i]; |
83 | ||
84 | if (ec->id == id) { | |
85 | is_unique = false; | |
86 | goto end; | |
87 | } | |
cf76ce92 | 88 | } |
272df73e | 89 | |
44c440bc PP |
90 | end: |
91 | return is_unique; | |
92 | } | |
93 | ||
94 | static | |
95 | struct bt_event_class *create_event_class_with_id( | |
96 | struct bt_stream_class *stream_class, uint64_t id) | |
97 | { | |
98 | int ret; | |
99 | struct bt_event_class *event_class; | |
100 | ||
101 | BT_ASSERT(stream_class); | |
102 | BT_ASSERT_PRE(event_class_id_is_unique(stream_class, id), | |
103 | "Duplicate event class ID: %![sc-]+S, id=%" PRIu64, | |
104 | stream_class, id); | |
105 | BT_LIB_LOGD("Creating event class object: %![sc-]+S, id=%" PRIu64, | |
106 | stream_class, id); | |
3dca2276 | 107 | event_class = g_new0(struct bt_event_class, 1); |
272df73e | 108 | if (!event_class) { |
870631a2 | 109 | BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate one event class."); |
3dca2276 | 110 | goto error; |
272df73e PP |
111 | } |
112 | ||
44c440bc PP |
113 | bt_object_init_shared_with_parent(&event_class->base, |
114 | destroy_event_class); | |
c6962c96 PP |
115 | event_class->user_attributes = bt_value_map_create(); |
116 | if (!event_class->user_attributes) { | |
117 | BT_LIB_LOGE_APPEND_CAUSE( | |
118 | "Failed to create a map value object."); | |
119 | goto error; | |
120 | } | |
121 | ||
44c440bc PP |
122 | event_class->id = id; |
123 | bt_property_uint_init(&event_class->log_level, | |
124 | BT_PROPERTY_AVAILABILITY_NOT_AVAILABLE, 0); | |
125 | event_class->name.str = g_string_new(NULL); | |
126 | if (!event_class->name.str) { | |
870631a2 | 127 | BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString."); |
c6962c96 | 128 | goto error; |
44c440bc PP |
129 | } |
130 | ||
131 | event_class->emf_uri.str = g_string_new(NULL); | |
132 | if (!event_class->emf_uri.str) { | |
870631a2 | 133 | BT_LIB_LOGE_APPEND_CAUSE("Failed to allocate a GString."); |
c6962c96 | 134 | goto error; |
272df73e PP |
135 | } |
136 | ||
312c056a PP |
137 | ret = bt_object_pool_initialize(&event_class->event_pool, |
138 | (bt_object_pool_new_object_func) bt_event_new, | |
139 | (bt_object_pool_destroy_object_func) free_event, | |
140 | event_class); | |
141 | if (ret) { | |
870631a2 PP |
142 | BT_LIB_LOGE_APPEND_CAUSE( |
143 | "Failed to initialize event pool: ret=%d", | |
312c056a PP |
144 | ret); |
145 | goto error; | |
146 | } | |
147 | ||
44c440bc PP |
148 | bt_object_set_parent(&event_class->base, &stream_class->base); |
149 | g_ptr_array_add(stream_class->event_classes, event_class); | |
150 | bt_stream_class_freeze(stream_class); | |
151 | BT_LIB_LOGD("Created event class object: %!+E", event_class); | |
3dca2276 | 152 | goto end; |
272df73e | 153 | |
3dca2276 | 154 | error: |
65300d60 | 155 | BT_OBJECT_PUT_REF_AND_RESET(event_class); |
272df73e PP |
156 | |
157 | end: | |
3dca2276 | 158 | return event_class; |
272df73e PP |
159 | } |
160 | ||
40f4ba76 PP |
161 | struct bt_event_class *bt_event_class_create( |
162 | struct bt_stream_class *stream_class) | |
44c440bc | 163 | { |
17f3083a | 164 | BT_ASSERT_PRE_NO_ERROR(); |
d5b13b9b | 165 | BT_ASSERT_PRE_SC_NON_NULL(stream_class); |
44c440bc PP |
166 | BT_ASSERT_PRE(stream_class->assigns_automatic_event_class_id, |
167 | "Stream class does not automatically assigns event class IDs: " | |
168 | "%![sc-]+S", stream_class); | |
40f4ba76 | 169 | return create_event_class_with_id(stream_class, |
44c440bc PP |
170 | (uint64_t) stream_class->event_classes->len); |
171 | } | |
172 | ||
40f4ba76 PP |
173 | struct bt_event_class *bt_event_class_create_with_id( |
174 | struct bt_stream_class *stream_class, uint64_t id) | |
44c440bc | 175 | { |
17f3083a | 176 | BT_ASSERT_PRE_NO_ERROR(); |
44c440bc PP |
177 | BT_ASSERT_PRE(!stream_class->assigns_automatic_event_class_id, |
178 | "Stream class automatically assigns event class IDs: " | |
179 | "%![sc-]+S", stream_class); | |
40f4ba76 | 180 | return create_event_class_with_id(stream_class, id); |
44c440bc PP |
181 | } |
182 | ||
40f4ba76 | 183 | const char *bt_event_class_get_name(const struct bt_event_class *event_class) |
272df73e | 184 | { |
d5b13b9b | 185 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
44c440bc | 186 | return event_class->name.value; |
272df73e PP |
187 | } |
188 | ||
d24d5663 | 189 | enum bt_event_class_set_name_status bt_event_class_set_name( |
d08300f5 | 190 | struct bt_event_class *event_class, const char *name) |
272df73e | 191 | { |
17f3083a | 192 | BT_ASSERT_PRE_NO_ERROR(); |
d5b13b9b PP |
193 | BT_ASSERT_PRE_EC_NON_NULL(event_class); |
194 | BT_ASSERT_PRE_NAME_NON_NULL(name); | |
bdb288b3 | 195 | BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); |
44c440bc PP |
196 | g_string_assign(event_class->name.str, name); |
197 | event_class->name.value = event_class->name.str->str; | |
3f7d4d90 | 198 | BT_LIB_LOGD("Set event class's name: %!+E", event_class); |
d24d5663 | 199 | return BT_FUNC_STATUS_OK; |
272df73e PP |
200 | } |
201 | ||
40f4ba76 | 202 | uint64_t bt_event_class_get_id(const struct bt_event_class *event_class) |
272df73e | 203 | { |
d5b13b9b | 204 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
44c440bc | 205 | return event_class->id; |
272df73e PP |
206 | } |
207 | ||
44c440bc | 208 | enum bt_property_availability bt_event_class_get_log_level( |
40f4ba76 | 209 | const struct bt_event_class *event_class, |
44c440bc | 210 | enum bt_event_class_log_level *log_level) |
272df73e | 211 | { |
d5b13b9b | 212 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
bdb288b3 | 213 | BT_ASSERT_PRE_DEV_NON_NULL(log_level, "Log level (output)"); |
44c440bc PP |
214 | *log_level = (enum bt_event_class_log_level) |
215 | event_class->log_level.value; | |
216 | return event_class->log_level.base.avail; | |
272df73e PP |
217 | } |
218 | ||
40f4ba76 PP |
219 | void bt_event_class_set_log_level( |
220 | struct bt_event_class *event_class, | |
3dca2276 | 221 | enum bt_event_class_log_level log_level) |
272df73e | 222 | { |
d5b13b9b | 223 | BT_ASSERT_PRE_EC_NON_NULL(event_class); |
bdb288b3 | 224 | BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); |
44c440bc PP |
225 | bt_property_uint_set(&event_class->log_level, |
226 | (uint64_t) log_level); | |
3f7d4d90 | 227 | BT_LIB_LOGD("Set event class's log level: %!+E", event_class); |
272df73e PP |
228 | } |
229 | ||
40f4ba76 | 230 | const char *bt_event_class_get_emf_uri(const struct bt_event_class *event_class) |
272df73e | 231 | { |
d5b13b9b | 232 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
44c440bc | 233 | return event_class->emf_uri.value; |
272df73e PP |
234 | } |
235 | ||
d24d5663 | 236 | enum bt_event_class_set_emf_uri_status bt_event_class_set_emf_uri( |
40f4ba76 | 237 | struct bt_event_class *event_class, |
3dca2276 | 238 | const char *emf_uri) |
272df73e | 239 | { |
17f3083a | 240 | BT_ASSERT_PRE_NO_ERROR(); |
d5b13b9b | 241 | BT_ASSERT_PRE_EC_NON_NULL(event_class); |
44c440bc | 242 | BT_ASSERT_PRE_NON_NULL(emf_uri, "EMF URI"); |
bdb288b3 | 243 | BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); |
44c440bc PP |
244 | g_string_assign(event_class->emf_uri.str, emf_uri); |
245 | event_class->emf_uri.value = event_class->emf_uri.str->str; | |
3f7d4d90 | 246 | BT_LIB_LOGD("Set event class's EMF URI: %!+E", event_class); |
d24d5663 | 247 | return BT_FUNC_STATUS_OK; |
272df73e PP |
248 | } |
249 | ||
094ff7c0 | 250 | struct bt_stream_class *bt_event_class_borrow_stream_class( |
50842bdc | 251 | struct bt_event_class *event_class) |
272df73e | 252 | { |
d5b13b9b | 253 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
44c440bc | 254 | return bt_event_class_borrow_stream_class_inline(event_class); |
272df73e PP |
255 | } |
256 | ||
40f4ba76 PP |
257 | const struct bt_stream_class * |
258 | bt_event_class_borrow_stream_class_const( | |
259 | const struct bt_event_class *event_class) | |
e5be10ef | 260 | { |
40f4ba76 | 261 | return bt_event_class_borrow_stream_class((void *) event_class); |
e5be10ef PP |
262 | } |
263 | ||
40f4ba76 PP |
264 | const struct bt_field_class * |
265 | bt_event_class_borrow_specific_context_field_class_const( | |
266 | const struct bt_event_class *event_class) | |
272df73e | 267 | { |
d5b13b9b | 268 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
5cd6d0e5 | 269 | return event_class->specific_context_fc; |
272df73e PP |
270 | } |
271 | ||
740faaf4 PP |
272 | struct bt_field_class * |
273 | bt_event_class_borrow_specific_context_field_class( | |
274 | struct bt_event_class *event_class) | |
275 | { | |
d5b13b9b | 276 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
740faaf4 PP |
277 | return event_class->specific_context_fc; |
278 | } | |
279 | ||
d24d5663 PP |
280 | enum bt_event_class_set_field_class_status |
281 | bt_event_class_set_specific_context_field_class( | |
40f4ba76 PP |
282 | struct bt_event_class *event_class, |
283 | struct bt_field_class *field_class) | |
272df73e | 284 | { |
44c440bc PP |
285 | int ret; |
286 | struct bt_stream_class *stream_class; | |
44c440bc | 287 | struct bt_resolve_field_path_context resolve_ctx = { |
44c440bc | 288 | .packet_context = NULL, |
44c440bc | 289 | .event_common_context = NULL, |
5cd6d0e5 | 290 | .event_specific_context = field_class, |
44c440bc PP |
291 | .event_payload = NULL, |
292 | }; | |
cb6f1f7d | 293 | |
17f3083a | 294 | BT_ASSERT_PRE_NO_ERROR(); |
d5b13b9b PP |
295 | BT_ASSERT_PRE_EC_NON_NULL(event_class); |
296 | BT_ASSERT_PRE_FC_NON_NULL(field_class); | |
bdb288b3 | 297 | BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); |
d5b13b9b | 298 | BT_ASSERT_PRE_FC_IS_STRUCT(field_class, "Specific context field class"); |
44c440bc PP |
299 | stream_class = bt_event_class_borrow_stream_class_inline( |
300 | event_class); | |
5cd6d0e5 | 301 | resolve_ctx.packet_context = stream_class->packet_context_fc; |
44c440bc | 302 | resolve_ctx.event_common_context = |
5cd6d0e5 | 303 | stream_class->event_common_context_fc; |
44c440bc | 304 | |
5cd6d0e5 | 305 | ret = bt_resolve_field_paths(field_class, &resolve_ctx); |
44c440bc | 306 | if (ret) { |
d08300f5 PP |
307 | /* |
308 | * This is the only reason for which | |
309 | * bt_resolve_field_paths() can fail: anything else | |
310 | * would be because a precondition is not satisfied. | |
311 | */ | |
d24d5663 | 312 | ret = BT_FUNC_STATUS_MEMORY_ERROR; |
cb6f1f7d PP |
313 | goto end; |
314 | } | |
315 | ||
862ca4ed | 316 | bt_field_class_make_part_of_trace_class(field_class); |
65300d60 | 317 | bt_object_put_ref(event_class->specific_context_fc); |
398454ed | 318 | event_class->specific_context_fc = field_class; |
6871026b | 319 | bt_object_get_ref_no_null_check(event_class->specific_context_fc); |
5cd6d0e5 | 320 | bt_field_class_freeze(field_class); |
3f7d4d90 | 321 | BT_LIB_LOGD("Set event class's specific context field class: %!+E", |
44c440bc | 322 | event_class); |
cb6f1f7d | 323 | |
cb6f1f7d PP |
324 | end: |
325 | return ret; | |
272df73e PP |
326 | } |
327 | ||
40f4ba76 PP |
328 | const struct bt_field_class *bt_event_class_borrow_payload_field_class_const( |
329 | const struct bt_event_class *event_class) | |
272df73e | 330 | { |
d5b13b9b | 331 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
5cd6d0e5 | 332 | return event_class->payload_fc; |
272df73e PP |
333 | } |
334 | ||
740faaf4 PP |
335 | struct bt_field_class *bt_event_class_borrow_payload_field_class( |
336 | struct bt_event_class *event_class) | |
337 | { | |
d5b13b9b | 338 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
740faaf4 PP |
339 | return event_class->payload_fc; |
340 | } | |
341 | ||
d24d5663 PP |
342 | enum bt_event_class_set_field_class_status |
343 | bt_event_class_set_payload_field_class( | |
40f4ba76 PP |
344 | struct bt_event_class *event_class, |
345 | struct bt_field_class *field_class) | |
272df73e | 346 | { |
44c440bc PP |
347 | int ret; |
348 | struct bt_stream_class *stream_class; | |
44c440bc | 349 | struct bt_resolve_field_path_context resolve_ctx = { |
44c440bc | 350 | .packet_context = NULL, |
44c440bc PP |
351 | .event_common_context = NULL, |
352 | .event_specific_context = NULL, | |
5cd6d0e5 | 353 | .event_payload = field_class, |
44c440bc | 354 | }; |
cb6f1f7d | 355 | |
17f3083a | 356 | BT_ASSERT_PRE_NO_ERROR(); |
d5b13b9b PP |
357 | BT_ASSERT_PRE_EC_NON_NULL(event_class); |
358 | BT_ASSERT_PRE_FC_NON_NULL(field_class); | |
bdb288b3 | 359 | BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); |
d5b13b9b | 360 | BT_ASSERT_PRE_FC_IS_STRUCT(field_class, "Payload field class"); |
44c440bc PP |
361 | stream_class = bt_event_class_borrow_stream_class_inline( |
362 | event_class); | |
5cd6d0e5 | 363 | resolve_ctx.packet_context = stream_class->packet_context_fc; |
44c440bc | 364 | resolve_ctx.event_common_context = |
5cd6d0e5 PP |
365 | stream_class->event_common_context_fc; |
366 | resolve_ctx.event_specific_context = event_class->specific_context_fc; | |
44c440bc | 367 | |
5cd6d0e5 | 368 | ret = bt_resolve_field_paths(field_class, &resolve_ctx); |
44c440bc | 369 | if (ret) { |
d08300f5 PP |
370 | /* |
371 | * This is the only reason for which | |
372 | * bt_resolve_field_paths() can fail: anything else | |
373 | * would be because a precondition is not satisfied. | |
374 | */ | |
d24d5663 | 375 | ret = BT_FUNC_STATUS_MEMORY_ERROR; |
cb6f1f7d PP |
376 | goto end; |
377 | } | |
378 | ||
862ca4ed | 379 | bt_field_class_make_part_of_trace_class(field_class); |
65300d60 | 380 | bt_object_put_ref(event_class->payload_fc); |
398454ed | 381 | event_class->payload_fc = field_class; |
6871026b | 382 | bt_object_get_ref_no_null_check(event_class->payload_fc); |
5cd6d0e5 | 383 | bt_field_class_freeze(field_class); |
3f7d4d90 | 384 | BT_LIB_LOGD("Set event class's payload field class: %!+E", event_class); |
cb6f1f7d PP |
385 | |
386 | end: | |
387 | return ret; | |
272df73e PP |
388 | } |
389 | ||
390 | BT_HIDDEN | |
40f4ba76 | 391 | void _bt_event_class_freeze(const struct bt_event_class *event_class) |
2a3ced3c | 392 | { |
5cd6d0e5 | 393 | /* The field classes are already frozen */ |
f6ccaed9 | 394 | BT_ASSERT(event_class); |
c6962c96 PP |
395 | BT_LIB_LOGD("Freezing event class's user attributes: %!+v", |
396 | event_class->user_attributes); | |
397 | bt_value_freeze(event_class->user_attributes); | |
44c440bc | 398 | BT_LIB_LOGD("Freezing event class: %!+E", event_class); |
40f4ba76 | 399 | ((struct bt_event_class *) event_class)->frozen = true; |
2a3ced3c | 400 | } |
c5b9b441 | 401 | |
c6962c96 PP |
402 | const struct bt_value *bt_event_class_borrow_user_attributes_const( |
403 | const struct bt_event_class *event_class) | |
404 | { | |
d5b13b9b | 405 | BT_ASSERT_PRE_DEV_EC_NON_NULL(event_class); |
c6962c96 PP |
406 | return event_class->user_attributes; |
407 | } | |
408 | ||
409 | struct bt_value *bt_event_class_borrow_user_attributes( | |
410 | struct bt_event_class *event_class) | |
411 | { | |
412 | return (void *) bt_event_class_borrow_user_attributes_const( | |
413 | (void *) event_class); | |
414 | } | |
415 | ||
416 | void bt_event_class_set_user_attributes( | |
417 | struct bt_event_class *event_class, | |
418 | const struct bt_value *user_attributes) | |
419 | { | |
d5b13b9b | 420 | BT_ASSERT_PRE_EC_NON_NULL(event_class); |
c6962c96 | 421 | BT_ASSERT_PRE_DEV_EVENT_CLASS_HOT(event_class); |
d5b13b9b PP |
422 | BT_ASSERT_PRE_USER_ATTRS_NON_NULL(user_attributes); |
423 | BT_ASSERT_PRE_USER_ATTRS_IS_MAP(user_attributes); | |
6871026b | 424 | bt_object_put_ref_no_null_check(event_class->user_attributes); |
c6962c96 | 425 | event_class->user_attributes = (void *) user_attributes; |
6871026b | 426 | bt_object_get_ref_no_null_check(event_class->user_attributes); |
c6962c96 PP |
427 | } |
428 | ||
c5b9b441 PP |
429 | void bt_event_class_get_ref(const struct bt_event_class *event_class) |
430 | { | |
431 | bt_object_get_ref(event_class); | |
432 | } | |
433 | ||
434 | void bt_event_class_put_ref(const struct bt_event_class *event_class) | |
435 | { | |
436 | bt_object_put_ref(event_class); | |
437 | } |