X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Fshm_types.h;h=c1ad7b6872caa2a31de7bd4f8ddc1fbb0f519f28;hb=6ba6fd60507f8e045bdc4f1be14e9d99c6a15f7f;hp=08226bdd214cae5e65ae0a4af6b26bc57078d3bf;hpb=0cdad3b1a77f830aa0d0a385f0ed4c06fe81c7ef;p=lttng-ust.git diff --git a/libringbuffer/shm_types.h b/libringbuffer/shm_types.h index 08226bdd..c1ad7b68 100644 --- a/libringbuffer/shm_types.h +++ b/libringbuffer/shm_types.h @@ -1,27 +1,33 @@ -#ifndef _LIBRINGBUFFER_SHM_TYPES_H -#define _LIBRINGBUFFER_SHM_TYPES_H - /* - * libringbuffer/shm_types.h + * SPDX-License-Identifier: LGPL-2.1-only * - * Copyright 2011 (c) - Mathieu Desnoyers - * - * Dual LGPL v2.1/GPL v2 license. + * Copyright (C) 2011-2012 Mathieu Desnoyers */ +#ifndef _LIBRINGBUFFER_SHM_TYPES_H +#define _LIBRINGBUFFER_SHM_TYPES_H + #include +#include +#include #include "shm_internal.h" -struct channel; +struct lttng_ust_lib_ring_buffer_channel; + +enum shm_object_type { + SHM_OBJECT_SHM, + SHM_OBJECT_MEM, +}; struct shm_object { + enum shm_object_type type; size_t index; /* within the object table */ int shm_fd; /* shm fd */ int wait_fd[2]; /* fd for wait/wakeup */ char *memory_map; - int is_shadow; size_t memory_map_size; uint64_t allocated_len; + int shm_fd_ownership; }; struct shm_object_table { @@ -32,13 +38,7 @@ struct shm_object_table { struct lttng_ust_shm_handle { struct shm_object_table *table; - DECLARE_SHMP(struct channel, chan); - /* - * In the consumer, chan points to a shadow copy, validated upon - * reception. The chan object is overridden in the consumer to - * point to this shadow copy. - */ - struct channel *shadow_chan; + DECLARE_SHMP(struct lttng_ust_lib_ring_buffer_channel, chan); }; #endif /* _LIBRINGBUFFER_SHM_TYPES_H */