Commit | Line | Data |
---|---|---|
1d498196 | 1 | /* |
c0c0989a | 2 | * SPDX-License-Identifier: LGPL-2.1-only |
1d498196 | 3 | * |
e92f3e28 | 4 | * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
1d498196 MD |
5 | */ |
6 | ||
c0c0989a MJ |
7 | #ifndef _LIBRINGBUFFER_SHM_INTERNAL_H |
8 | #define _LIBRINGBUFFER_SHM_INTERNAL_H | |
9 | ||
1d498196 MD |
10 | struct shm_ref { |
11 | volatile ssize_t index; /* within the object table */ | |
12 | volatile ssize_t offset; /* within the object */ | |
13 | }; | |
14 | ||
15 | #define DECLARE_SHMP(type, name) \ | |
16 | union { \ | |
17 | struct shm_ref _ref; \ | |
18 | type *_type; \ | |
19 | } name | |
20 | ||
21 | #endif /* _LIBRINGBUFFER_SHM_INTERNAL_H */ |