lib: Reset libbabeltrace2 to SONANE 0
[babeltrace.git] / include / babeltrace / trace-ir / stream-internal.h
index 7675b7f9b91982f6240a733fc7a59bdd87801188..bad49938cc51b86ef25a40c54858fdd224ff1408 100644 (file)
@@ -2,10 +2,9 @@
 #define BABELTRACE_TRACE_IR_STREAM_INTERNAL_H
 
 /*
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
- * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
@@ -38,7 +37,7 @@ struct bt_stream;
 struct bt_stream {
        struct bt_object base;
 
-       /* Weak: parent is this class's trace */
+       /* Owned by this */
        struct bt_stream_class *class;
 
        struct {
@@ -57,7 +56,7 @@ struct bt_stream {
 };
 
 BT_HIDDEN
-void _bt_stream_freeze(struct bt_stream *stream);
+void _bt_stream_freeze(const struct bt_stream *stream);
 
 #ifdef BT_DEV_MODE
 # define bt_stream_freeze              _bt_stream_freeze
@@ -65,4 +64,11 @@ void _bt_stream_freeze(struct bt_stream *stream);
 # define bt_stream_freeze(_stream)
 #endif
 
+static inline
+struct bt_trace *bt_stream_borrow_trace_inline(const struct bt_stream *stream)
+{
+       BT_ASSERT(stream);
+       return (void *) bt_object_borrow_parent(&stream->base);
+}
+
 #endif /* BABELTRACE_TRACE_IR_STREAM_INTERNAL_H */
This page took 0.024005 seconds and 4 git commands to generate.