Move to kernel style SPDX license identifiers
[lttng-ust.git] / libringbuffer / shm_types.h
index 8b01d803e8ad4c2189f8bf40dbbab0bf9188511a..896474fcad2c2fa56851450c23688b6b160facc2 100644 (file)
@@ -1,39 +1,33 @@
-#ifndef _LIBRINGBUFFER_SHM_TYPES_H
-#define _LIBRINGBUFFER_SHM_TYPES_H
-
 /*
- * libringbuffer/shm_types.h
+ * SPDX-License-Identifier: LGPL-2.1-only
  *
  * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * 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
  */
 
+#ifndef _LIBRINGBUFFER_SHM_TYPES_H
+#define _LIBRINGBUFFER_SHM_TYPES_H
+
 #include <stdint.h>
+#include <stddef.h>
+#include <limits.h>
 #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;
-       int is_shadow;
        size_t memory_map_size;
        uint64_t allocated_len;
+       int shm_fd_ownership;
 };
 
 struct shm_object_table {
@@ -45,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 */
This page took 0.023227 seconds and 4 git commands to generate.