2 * Copyright (C) 2017 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef LTTNG_BUFFER_VIEW_H
19 #define LTTNG_BUFFER_VIEW_H
23 #include <common/macros.h>
25 struct lttng_dynamic_buffer
;
27 struct lttng_buffer_view
{
33 * Return a buffer view referencing a subset of the memory referenced by another
36 * @src Source view to reference
37 * @offset Offset to apply to the source memory content
38 * @len Length of the memory contents to reference. Passing -1 will
39 * cause the view to reference the whole view from the offset
42 * Note that a buffer view never assumes the ownership of the memory it
46 struct lttng_buffer_view
lttng_buffer_view_from_view(
47 const struct lttng_buffer_view
*src
, size_t offset
,
51 * Return a buffer view referencing a subset of the memory referenced by a
54 * @src Source dynamic buffer to reference
55 * @offset Offset to apply to the source memory content
56 * @len Length of the memory contents to reference. Passing -1 will
57 * cause the view to reference the whole dynamic buffer from the
60 * Note that a buffer view never assumes the ownership of the memory it
64 struct lttng_buffer_view
lttng_buffer_view_from_dynamic_buffer(
65 const struct lttng_dynamic_buffer
*src
, size_t offset
,
68 #endif /* LTTNG_BUFFER_VIEW_H */
This page took 0.032087 seconds and 4 git commands to generate.