Move to kernel style SPDX license identifiers
[lttng-ust.git] / libcounter / shm_types.h
CommitLineData
ebabbf58 1/*
c0c0989a 2 * SPDX-License-Identifier: LGPL-2.1-only
ebabbf58
MD
3 *
4 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ebabbf58
MD
5 */
6
c0c0989a
MJ
7#ifndef _LIBCOUNTER_SHM_TYPES_H
8#define _LIBCOUNTER_SHM_TYPES_H
9
ebabbf58
MD
10#include <stdint.h>
11#include <stddef.h>
12#include <limits.h>
13#include "shm_internal.h"
14
15enum lttng_counter_shm_object_type {
16 LTTNG_COUNTER_SHM_OBJECT_SHM,
17 LTTNG_COUNTER_SHM_OBJECT_MEM,
18};
19
20struct lttng_counter_shm_object {
21 enum lttng_counter_shm_object_type type;
22 size_t index; /* within the object table */
23 int shm_fd; /* shm fd */
24 char *memory_map;
25 size_t memory_map_size;
26 uint64_t allocated_len;
27 int shm_fd_ownership;
28};
29
30struct lttng_counter_shm_object_table {
31 size_t size;
32 size_t allocated_len;
33 struct lttng_counter_shm_object objects[];
34};
35
36struct lttng_counter_shm_handle {
37 struct lttng_counter_shm_object_table *table;
38};
39
40#endif /* _LIBCOUNTER_SHM_TYPES_H */
This page took 0.023465 seconds and 4 git commands to generate.