#include <time.h>
#include <unistd.h>
+#include "compiler.h"
+
#ifndef F_OFD_GETLK
#define F_OFD_GETLK 36
#endif
* 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.
* (except in the test case) I may remove the support for it in sem as
* 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().
* \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.
*/
-extern int lxcunlock(struct lxc_lock *lock);
+__hidden extern int lxcunlock(struct lxc_lock *lock);
/*!
* \brief Free a lock created by \ref lxc_newlock().
*
* \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.
*/
-extern void process_lock(void);
+__hidden extern void process_lock(void);
/*!
* \brief Unlock the current process.
*/
-extern void process_unlock(void);
+__hidden extern void process_unlock(void);
struct lxc_container;
*
* \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.
*
* \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.
* \return \c 0 on success, or an \ref lxclock() error return
* 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.
* \param c Container.
*
*/
-extern void container_disk_unlock(struct lxc_container *c);
+__hidden extern void container_disk_unlock(struct lxc_container *c);
#endif
lxc_test_getkeys_SOURCES = getkeys.c
lxc_test_get_item_SOURCES = get_item.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_may_control_SOURCES = may_control.c
lxc_test_mount_injection_SOURCES = mount_injection.c \