#include <stdio.h>
#include <sys/mman.h>
+#include "compiler.h"
+
/**
* lxc_ringbuf - Implements a simple and efficient memory mapped ringbuffer.
* - The "addr" field of struct lxc_ringbuf is considered immutable. Instead the
*
* @param[in] size Size of the new ringbuffer as a power of 2.
*/
-extern int lxc_ringbuf_create(struct lxc_ringbuf *buf, size_t size);
-extern void lxc_ringbuf_move_read_addr(struct lxc_ringbuf *buf, size_t len);
-extern int lxc_ringbuf_write(struct lxc_ringbuf *buf, const char *msg, size_t len);
-extern int lxc_ringbuf_read(struct lxc_ringbuf *buf, char *out, size_t *len);
+__hidden extern int lxc_ringbuf_create(struct lxc_ringbuf *buf, size_t size);
+__hidden extern void lxc_ringbuf_move_read_addr(struct lxc_ringbuf *buf, size_t len);
+__hidden extern int lxc_ringbuf_write(struct lxc_ringbuf *buf, const char *msg, size_t len);
+__hidden extern int lxc_ringbuf_read(struct lxc_ringbuf *buf, char *out, size_t *len);
static inline void lxc_ringbuf_release(struct lxc_ringbuf *buf)
{
../lxc/nl.c ../lxc/nl.h \
../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
../lxc/string_utils.c ../lxc/string_utils.h
if ENABLE_SECCOMP
lxc_test_api_reboot_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
../lxc/nl.c ../lxc/nl.h \
../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
../lxc/string_utils.c ../lxc/string_utils.h
if ENABLE_SECCOMP
lxc_test_attach_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
../lxc/nl.c ../lxc/nl.h \
../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
../lxc/string_utils.c ../lxc/string_utils.h
if ENABLE_SECCOMP
lxc_test_cgpath_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
../lxc/nl.c ../lxc/nl.h \
../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
../lxc/string_utils.c ../lxc/string_utils.h
if ENABLE_SECCOMP
lxc_test_config_jump_table_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
../lxc/nl.c ../lxc/nl.h \
../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
../lxc/string_utils.c ../lxc/string_utils.h
if ENABLE_SECCOMP
lxc_test_parse_config_file_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h
../lxc/nl.c ../lxc/nl.h \
../lxc/parse.c ../lxc/parse.h \
../lxc/process_utils.c ../lxc/process_utils.h \
+ ../lxc/ringbuf.c ../lxc/ringbuf.h \
../lxc/string_utils.c ../lxc/string_utils.h
if ENABLE_SECCOMP
lxc_test_utils_SOURCES += ../lxc/seccomp.c ../lxc/lxcseccomp.h