diff globals.c @ 7:8339ab15527d

Add running/stopped containers global statistics and refactor some things
author Louis Opter <louis@dotcloud.com>
date Sat, 01 Jan 2011 17:46:40 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/globals.c	Sat Jan 01 17:46:40 2011 +0100
@@ -0,0 +1,22 @@
+#include <sys/types.h>
+
+#include <assert.h>
+#include <string.h>
+
+#include "lxcstats.h"
+#include "_lxcstats.h"
+
+struct lxcst_globals _lxcst_globals = { 0, 0 };
+
+void
+_lxcst_globals_reset(void)
+{
+    memset(&_lxcst_globals, 0, sizeof(_lxcst_globals));
+}
+
+void
+lxcst_globals_statistics(struct lxcst_globals *sb)
+{
+    assert(sb);
+    memcpy(sb, &_lxcst_globals, sizeof(*sb));
+}