Implement shm object table
[lttng-ust.git] / libringbuffer / shm_internal.h
diff --git a/libringbuffer/shm_internal.h b/libringbuffer/shm_internal.h
new file mode 100644 (file)
index 0000000..77f345d
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef _LIBRINGBUFFER_SHM_INTERNAL_H
+#define _LIBRINGBUFFER_SHM_INTERNAL_H
+
+/*
+ * libringbuffer/shm_internal.h
+ *
+ * Copyright 2011 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Dual LGPL v2.1/GPL v2 license.
+ */
+
+struct shm_ref {
+       volatile ssize_t index;         /* within the object table */
+       volatile ssize_t offset;        /* within the object */
+};
+
+#define DECLARE_SHMP(type, name)       \
+       union {                         \
+               struct shm_ref _ref;    \
+               type *_type;            \
+       } name
+
+#endif /* _LIBRINGBUFFER_SHM_INTERNAL_H */
This page took 0.026626 seconds and 4 git commands to generate.