summaryrefslogtreecommitdiffstats
path: root/src/libcgroup-internal.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-03-24 21:04:36 +0100
committerDhaval Giani <dhaval.giani@gmail.com>2010-03-26 12:56:44 +0100
commit5d10a64fe1e07e240e4e16c8e8aede8dcd552149 (patch)
tree78438268e8a00d6b84cb56b265b17d048adab3a1 /src/libcgroup-internal.h
parent162e7612f623fe69437ef258b033e4c1518a5cc8 (diff)
downloadlibcg-5d10a64fe1e07e240e4e16c8e8aede8dcd552149.tar.gz
libcg-5d10a64fe1e07e240e4e16c8e8aede8dcd552149.tar.xz
libcg-5d10a64fe1e07e240e4e16c8e8aede8dcd552149.zip
api: don't keep one copy of the mount table per .c file
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>
Diffstat (limited to 'src/libcgroup-internal.h')
-rw-r--r--src/libcgroup-internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h
index 722bc65..d9838e9 100644
--- a/src/libcgroup-internal.h
+++ b/src/libcgroup-internal.h
@@ -143,8 +143,8 @@ struct cgroup *create_cgroup_from_name_value_pairs(const char *name,
/*
* 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