aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag_pool.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-05 00:10:48 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-05 00:27:01 -0700
commitf0a68935f9da6a77cd4688fc5836b2ce8f058041 (patch)
tree3380fd00129c615b0efb6c591b2ee043c8a582f1 /src/tag_pool.h
parent6e8200227f617b7604a01f372460661d8ec5da32 (diff)
downloadmpd-f0a68935f9da6a77cd4688fc5836b2ce8f058041.tar.gz
mpd-f0a68935f9da6a77cd4688fc5836b2ce8f058041.tar.xz
mpd-f0a68935f9da6a77cd4688fc5836b2ce8f058041.zip
tag: lock all accesses to tag_pool
The tag pool is a shared global resource that is infrequently modified. However, it can occasionally be modified by several threads, especially by the metadata_pipe for streaming metadata (both reading/writing). The bulk tag_item pool is NOT locked as currently only the update thread uses it.
Diffstat (limited to '')
-rw-r--r--src/tag_pool.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tag_pool.h b/src/tag_pool.h
index e19b2f4b4..d837d4446 100644
--- a/src/tag_pool.h
+++ b/src/tag_pool.h
@@ -20,6 +20,9 @@
#define TAG_POOL_H
#include "tag.h"
+#include "os_compat.h"
+
+extern pthread_mutex_t tag_pool_lock;
struct tag_item;