| 1 | #ifndef _LIBRINGBUFFER_SHM_INTERNAL_H |
| 2 | #define _LIBRINGBUFFER_SHM_INTERNAL_H |
| 3 | |
| 4 | /* |
| 5 | * libringbuffer/shm_internal.h |
| 6 | * |
| 7 | * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 8 | * |
| 9 | * Dual LGPL v2.1/GPL v2 license. |
| 10 | */ |
| 11 | |
| 12 | struct shm_ref { |
| 13 | volatile ssize_t index; /* within the object table */ |
| 14 | volatile ssize_t offset; /* within the object */ |
| 15 | }; |
| 16 | |
| 17 | #define DECLARE_SHMP(type, name) \ |
| 18 | union { \ |
| 19 | struct shm_ref _ref; \ |
| 20 | type *_type; \ |
| 21 | } name |
| 22 | |
| 23 | #endif /* _LIBRINGBUFFER_SHM_INTERNAL_H */ |