X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Fshm_types.h;h=896474fcad2c2fa56851450c23688b6b160facc2;hb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;hp=9869eb88a82af57f25d1c34bed6ef306a4c48478;hpb=38fae1d354502ffb37f471fbd0fef03412606cc0;p=lttng-ust.git diff --git a/libringbuffer/shm_types.h b/libringbuffer/shm_types.h index 9869eb88..896474fc 100644 --- a/libringbuffer/shm_types.h +++ b/libringbuffer/shm_types.h @@ -1,26 +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; +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; size_t memory_map_size; - size_t allocated_len; + uint64_t allocated_len; + int shm_fd_ownership; }; struct shm_object_table { @@ -32,12 +39,6 @@ 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; }; #endif /* _LIBRINGBUFFER_SHM_TYPES_H */