Move to kernel style SPDX license identifiers
[lttng-ust.git] / libringbuffer / shm_types.h
CommitLineData
1d498196 1/*
c0c0989a 2 * SPDX-License-Identifier: LGPL-2.1-only
1d498196 3 *
e92f3e28 4 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
1d498196
MD
5 */
6
c0c0989a
MJ
7#ifndef _LIBRINGBUFFER_SHM_TYPES_H
8#define _LIBRINGBUFFER_SHM_TYPES_H
9
1d498196 10#include <stdint.h>
b4051ad8 11#include <stddef.h>
a9ff648c 12#include <limits.h>
1d498196
MD
13#include "shm_internal.h"
14
15struct channel;
16
74d81a6c
MD
17enum shm_object_type {
18 SHM_OBJECT_SHM,
19 SHM_OBJECT_MEM,
20};
21
1d498196 22struct shm_object {
74d81a6c 23 enum shm_object_type type;
1d498196
MD
24 size_t index; /* within the object table */
25 int shm_fd; /* shm fd */
26 int wait_fd[2]; /* fd for wait/wakeup */
27 char *memory_map;
0cdad3b1
MD
28 size_t memory_map_size;
29 uint64_t allocated_len;
5ea386c3 30 int shm_fd_ownership;
1d498196
MD
31};
32
33struct shm_object_table {
34 size_t size;
35 size_t allocated_len;
36 struct shm_object objects[];
37};
38
38fae1d3 39struct lttng_ust_shm_handle {
1d498196
MD
40 struct shm_object_table *table;
41 DECLARE_SHMP(struct channel, chan);
1d498196
MD
42};
43
44#endif /* _LIBRINGBUFFER_SHM_TYPES_H */
This page took 0.032319 seconds and 4 git commands to generate.