]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
ringbuf: hide unnecessary symbols
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 20 Jul 2020 16:49:55 +0000 (18:49 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 20 Jul 2020 16:49:55 +0000 (18:49 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/ringbuf.h
src/tests/Makefile.am

index dbbc7dacaed37187d8ff71d609a764ee1cd805e0..889b6e65ce37c49095eff7eded6efb0ad85b42ce 100644 (file)
@@ -8,6 +8,8 @@
 #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
@@ -29,10 +31,10 @@ struct lxc_ringbuf {
  *
  * @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)
 {
index c0ea315a8c7f55db715a1263f68ee2bdd0511e1d..6a6f5ff2811c0d02e198bec9c190abda5e36999d 100644 (file)
@@ -24,6 +24,7 @@ lxc_test_api_reboot_SOURCES = api_reboot.c \
                              ../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
@@ -47,6 +48,7 @@ lxc_test_attach_SOURCES = attach.c \
                          ../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
@@ -70,6 +72,7 @@ lxc_test_cgpath_SOURCES = cgpath.c \
                          ../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
@@ -95,6 +98,7 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \
                                     ../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
@@ -138,6 +142,7 @@ lxc_test_parse_config_file_SOURCES = parse_config_file.c \
                                     ../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
@@ -184,6 +189,7 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \
                          ../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