X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libringbuffer%2Fshm_types.h;h=94ccfa565a6c2bc7577d6b9533e0916d4983fd57;hb=32974710aab75d01a8ae48d0be3641c2f56e45a9;hp=e92c0af03d3d99e61f92b07684536161a116f4bf;hpb=1d4981969313da002983ca979bd85c95493f7316;p=lttng-ust.git diff --git a/libringbuffer/shm_types.h b/libringbuffer/shm_types.h index e92c0af0..94ccfa56 100644 --- a/libringbuffer/shm_types.h +++ b/libringbuffer/shm_types.h @@ -4,23 +4,44 @@ /* * libringbuffer/shm_types.h * - * Copyright 2011 (c) - Mathieu Desnoyers + * Copyright (C) 2011-2012 Mathieu Desnoyers * - * Dual LGPL v2.1/GPL v2 license. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #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 { @@ -29,15 +50,9 @@ struct shm_object_table { struct shm_object objects[]; }; -struct shm_handle { +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 */