Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
Loading...
Searching...
No Matches
connection.h
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7#ifndef BABELTRACE2_GRAPH_CONNECTION_H
8#define BABELTRACE2_GRAPH_CONNECTION_H
9
10/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
14#endif
15
16#include <babeltrace2/types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
77 const bt_connection *connection) __BT_NOEXCEPT;
78
93 const bt_connection *connection) __BT_NOEXCEPT;
94
117extern void bt_connection_get_ref(const bt_connection *connection)
118 __BT_NOEXCEPT;
119
135extern void bt_connection_put_ref(const bt_connection *connection)
136 __BT_NOEXCEPT;
137
152#define BT_CONNECTION_PUT_REF_AND_RESET(_connection) \
153 do { \
154 bt_connection_put_ref(_connection); \
155 (_connection) = NULL; \
156 } while (0)
157
183#define BT_CONNECTION_MOVE_REF(_dst, _src) \
184 do { \
185 bt_connection_put_ref(_dst); \
186 (_dst) = (_src); \
187 (_src) = NULL; \
188 } while (0)
189
194#ifdef __cplusplus
195}
196#endif
197
198#endif /* BABELTRACE2_GRAPH_CONNECTION_H */
const bt_port_output * bt_connection_borrow_upstream_port_const(const bt_connection *connection)
Borrows the downstream output port of the connection connection.
void bt_connection_put_ref(const bt_connection *connection)
Decrements the reference count of the connection connection.
void bt_connection_get_ref(const bt_connection *connection)
Increments the reference count of the connection connection.
const bt_port_input * bt_connection_borrow_downstream_port_const(const bt_connection *connection)
Borrows the upstream input port of the connection connection.
struct bt_connection bt_connection
Connection.
Definition types.h:33
struct bt_port_output bt_port_output
Output port.
Definition types.h:67
struct bt_port_input bt_port_input
Input port.
Definition types.h:66