The mount table variables need to be declared in the header file and
defined in the .c file. If we don't do that every .o file will end up
with its own copy of those variables.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
/* Namespace */
__thread char *cg_namespace_table[CG_CONTROLLER_MAX];
+pthread_rwlock_t cg_mount_table_lock = PTHREAD_RWLOCK_INITIALIZER;
+struct cg_mount_table_s cg_mount_table[CG_CONTROLLER_MAX];
+
const char const *cgroup_strerror_codes[] = {
"Cgroup is not compiled in",
"Cgroup is not mounted",
/*
* Main mounting structures
*/
-struct cg_mount_table_s cg_mount_table[CG_CONTROLLER_MAX];
-static pthread_rwlock_t cg_mount_table_lock = PTHREAD_RWLOCK_INITIALIZER;
+extern struct cg_mount_table_s cg_mount_table[CG_CONTROLLER_MAX];
+extern pthread_rwlock_t cg_mount_table_lock;
/*
* config related structures