2 * SPDX-License-Identifier: MIT
4 * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
5 * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 #ifndef BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
9 #define BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
11 #include <babeltrace2/trace-ir/stream.h>
12 #include "lib/object.h"
13 #include "lib/object-pool.h"
14 #include "common/macros.h"
20 struct bt_stream_class
;
24 struct bt_object base
;
27 struct bt_value
*user_attributes
;
30 struct bt_stream_class
*class;
35 /* NULL or `str->str` above */
41 /* Pool of `struct bt_packet *` */
42 struct bt_object_pool packet_pool
;
48 void _bt_stream_freeze(const struct bt_stream
*stream
);
51 # define bt_stream_freeze _bt_stream_freeze
53 # define bt_stream_freeze(_stream)
57 struct bt_trace
*bt_stream_borrow_trace_inline(const struct bt_stream
*stream
)
59 BT_ASSERT_DBG(stream
);
60 return (void *) bt_object_borrow_parent(&stream
->base
);
63 #endif /* BABELTRACE_TRACE_IR_STREAM_INTERNAL_H */