2 * SPDX-License-Identifier: LGPL-2.1-only
4 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 #ifndef _LIBCOUNTER_SHM_TYPES_H
8 #define _LIBCOUNTER_SHM_TYPES_H
13 #include "shm_internal.h"
15 enum lttng_counter_shm_object_type
{
16 LTTNG_COUNTER_SHM_OBJECT_SHM
,
17 LTTNG_COUNTER_SHM_OBJECT_MEM
,
20 struct 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 */
25 size_t memory_map_size
;
26 uint64_t allocated_len
;
30 struct lttng_counter_shm_object_table
{
33 struct lttng_counter_shm_object objects
[];
36 struct lttng_counter_shm_handle
{
37 struct lttng_counter_shm_object_table
*table
;
40 #endif /* _LIBCOUNTER_SHM_TYPES_H */