2 * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-only
8 #ifndef LTTNG_BUFFER_VIEW_H
9 #define LTTNG_BUFFER_VIEW_H
13 #include <common/macros.h>
15 struct lttng_dynamic_buffer
;
17 struct lttng_buffer_view
{
23 * Return a buffer view referencing a subset of the memory referenced by a raw
26 * @src Source buffer to reference
27 * @offset Offset to apply to the source memory buffer
28 * @len Length of the memory contents to reference.
30 * Note that a buffer view never assumes the ownership of the memory it
34 struct lttng_buffer_view
lttng_buffer_view_init(
35 const char *src
, size_t offset
, ptrdiff_t len
);
38 * Return a buffer view referencing a subset of the memory referenced by another
41 * @src Source view to reference
42 * @offset Offset to apply to the source memory content
43 * @len Length of the memory contents to reference. Passing -1 will
44 * cause the view to reference the whole view from the offset
47 * Note that a buffer view never assumes the ownership of the memory it
51 struct lttng_buffer_view
lttng_buffer_view_from_view(
52 const struct lttng_buffer_view
*src
, size_t offset
,
56 * Return a buffer view referencing a subset of the memory referenced by a
59 * @src Source dynamic buffer to reference
60 * @offset Offset to apply to the source memory content
61 * @len Length of the memory contents to reference. Passing -1 will
62 * cause the view to reference the whole dynamic buffer from the
65 * Note that a buffer view never assumes the ownership of the memory it
69 struct lttng_buffer_view
lttng_buffer_view_from_dynamic_buffer(
70 const struct lttng_dynamic_buffer
*src
, size_t offset
,
73 #endif /* LTTNG_BUFFER_VIEW_H */
This page took 0.048436 seconds and 4 git commands to generate.