summaryrefslogtreecommitdiffstats
path: root/src/global_statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/global_statistics.c')
-rwxr-xr-xsrc/global_statistics.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/global_statistics.c b/src/global_statistics.c
new file mode 100755
index 000000000..d4a04efd2
--- /dev/null
+++ b/src/global_statistics.c
@@ -0,0 +1,18 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <pthread.h>
+
+#include "global_statistics.h"
+
+struct global_statistics global_statistics = { 0ULL, 0ULL, 0ULL, 0ULL };
+
+pthread_mutex_t global_statistics_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+void global_statistics_lock(void) {
+ pthread_mutex_lock(&global_statistics_mutex);
+}
+
+void global_statistics_unlock(void) {
+ pthread_mutex_unlock(&global_statistics_mutex);
+}