Cleanup: remove duplicate check for 0 num_subbuf and subbuf_size
[lttng-ust.git] / libringbuffer / shm_types.h
CommitLineData
1d498196
MD
1#ifndef _LIBRINGBUFFER_SHM_TYPES_H
2#define _LIBRINGBUFFER_SHM_TYPES_H
3
4/*
5 * libringbuffer/shm_types.h
6 *
7 * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * Dual LGPL v2.1/GPL v2 license.
10 */
11
12#include <stdint.h>
13#include "shm_internal.h"
14
15struct channel;
16
17struct shm_object {
18 size_t index; /* within the object table */
19 int shm_fd; /* shm fd */
20 int wait_fd[2]; /* fd for wait/wakeup */
21 char *memory_map;
7a784989 22 int is_shadow;
0cdad3b1
MD
23 size_t memory_map_size;
24 uint64_t allocated_len;
1d498196
MD
25};
26
27struct shm_object_table {
28 size_t size;
29 size_t allocated_len;
30 struct shm_object objects[];
31};
32
38fae1d3 33struct lttng_ust_shm_handle {
1d498196
MD
34 struct shm_object_table *table;
35 DECLARE_SHMP(struct channel, chan);
36 /*
37 * In the consumer, chan points to a shadow copy, validated upon
38 * reception. The chan object is overridden in the consumer to
39 * point to this shadow copy.
40 */
41 struct channel *shadow_chan;
42};
43
44#endif /* _LIBRINGBUFFER_SHM_TYPES_H */
This page took 0.024521 seconds and 4 git commands to generate.