lxclock: hide unnecessary symbols

parent 7cf9ab57
...@@ -79,4 +79,8 @@ ...@@ -79,4 +79,8 @@
#define __hidden __attribute__((visibility("hidden"))) #define __hidden __attribute__((visibility("hidden")))
#endif #endif
#ifndef __public
#define __public __attribute__((visibility("default")))
#endif
#endif /* __LXC_COMPILER_H */ #endif /* __LXC_COMPILER_H */
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include "compiler.h"
#ifndef F_OFD_GETLK #ifndef F_OFD_GETLK
#define F_OFD_GETLK 36 #define F_OFD_GETLK 36
#endif #endif
...@@ -71,7 +73,7 @@ struct lxc_lock { ...@@ -71,7 +73,7 @@ struct lxc_lock {
* freed when the container is freed), and \c u.f.fd = -1. * freed when the container is freed), and \c u.f.fd = -1.
* *
*/ */
extern struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name); __hidden extern struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name);
/*! /*!
* \brief Take an existing lock. * \brief Take an existing lock.
...@@ -89,7 +91,7 @@ extern struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name); ...@@ -89,7 +91,7 @@ extern struct lxc_lock *lxc_newlock(const char *lxcpath, const char *name);
* (except in the test case) I may remove the support for it in sem as * (except in the test case) I may remove the support for it in sem as
* well. * well.
*/ */
extern int lxclock(struct lxc_lock *lock, int timeout); __hidden extern int lxclock(struct lxc_lock *lock, int timeout);
/*! /*!
* \brief Unlock specified lock previously locked using \ref lxclock(). * \brief Unlock specified lock previously locked using \ref lxclock().
...@@ -99,24 +101,24 @@ extern int lxclock(struct lxc_lock *lock, int timeout); ...@@ -99,24 +101,24 @@ extern int lxclock(struct lxc_lock *lock, int timeout);
* \return \c 0 on success, \c -2 if provided lock was not already held, * \return \c 0 on success, \c -2 if provided lock was not already held,
* otherwise \c -1 with \c errno saved from \c fcntl(2) or sem_post function. * otherwise \c -1 with \c errno saved from \c fcntl(2) or sem_post function.
*/ */
extern int lxcunlock(struct lxc_lock *lock); __hidden extern int lxcunlock(struct lxc_lock *lock);
/*! /*!
* \brief Free a lock created by \ref lxc_newlock(). * \brief Free a lock created by \ref lxc_newlock().
* *
* \param lock Lock. * \param lock Lock.
*/ */
extern void lxc_putlock(struct lxc_lock *lock); __hidden extern void lxc_putlock(struct lxc_lock *lock);
/*! /*!
* \brief Lock the current process. * \brief Lock the current process.
*/ */
extern void process_lock(void); __hidden extern void process_lock(void);
/*! /*!
* \brief Unlock the current process. * \brief Unlock the current process.
*/ */
extern void process_unlock(void); __hidden extern void process_unlock(void);
struct lxc_container; struct lxc_container;
...@@ -127,14 +129,14 @@ struct lxc_container; ...@@ -127,14 +129,14 @@ struct lxc_container;
* *
* \return As for \ref lxclock(). * \return As for \ref lxclock().
*/ */
extern int container_mem_lock(struct lxc_container *c); __hidden extern int container_mem_lock(struct lxc_container *c);
/*! /*!
* \brief Unlock the containers memory. * \brief Unlock the containers memory.
* *
* \param c Container. * \param c Container.
*/ */
extern void container_mem_unlock(struct lxc_container *c); __hidden extern void container_mem_unlock(struct lxc_container *c);
/*! /*!
* \brief Lock the containers disk data. * \brief Lock the containers disk data.
...@@ -144,7 +146,7 @@ extern void container_mem_unlock(struct lxc_container *c); ...@@ -144,7 +146,7 @@ extern void container_mem_unlock(struct lxc_container *c);
* \return \c 0 on success, or an \ref lxclock() error return * \return \c 0 on success, or an \ref lxclock() error return
* values on error. * values on error.
*/ */
extern int container_disk_lock(struct lxc_container *c); __hidden extern int container_disk_lock(struct lxc_container *c);
/*! /*!
* \brief Unlock the containers disk data. * \brief Unlock the containers disk data.
...@@ -152,6 +154,6 @@ extern int container_disk_lock(struct lxc_container *c); ...@@ -152,6 +154,6 @@ extern int container_disk_lock(struct lxc_container *c);
* \param c Container. * \param c Container.
* *
*/ */
extern void container_disk_unlock(struct lxc_container *c); __hidden extern void container_disk_unlock(struct lxc_container *c);
#endif #endif
...@@ -74,7 +74,12 @@ lxc_test_device_add_remove_SOURCES = device_add_remove.c ...@@ -74,7 +74,12 @@ lxc_test_device_add_remove_SOURCES = device_add_remove.c
lxc_test_getkeys_SOURCES = getkeys.c lxc_test_getkeys_SOURCES = getkeys.c
lxc_test_get_item_SOURCES = get_item.c lxc_test_get_item_SOURCES = get_item.c
lxc_test_list_SOURCES = list.c lxc_test_list_SOURCES = list.c
lxc_test_locktests_SOURCES = locktests.c lxc_test_locktests_SOURCES = locktests.c \
../lxc/caps.c ../lxc/caps.h \
../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/log.c ../lxc/log.h \
../lxc/lxclock.c ../lxc/lxclock.h \
../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_lxcpath_SOURCES = lxcpath.c lxc_test_lxcpath_SOURCES = lxcpath.c
lxc_test_may_control_SOURCES = may_control.c lxc_test_may_control_SOURCES = may_control.c
lxc_test_mount_injection_SOURCES = mount_injection.c \ lxc_test_mount_injection_SOURCES = mount_injection.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment