From f0a68935f9da6a77cd4688fc5836b2ce8f058041 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 5 Sep 2008 00:10:48 -0700 Subject: 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. --- src/tag_pool.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tag_pool.c') diff --git a/src/tag_pool.c b/src/tag_pool.c index 89efef1fc..d227a2988 100644 --- a/src/tag_pool.c +++ b/src/tag_pool.c @@ -19,6 +19,8 @@ #include "tag_pool.h" #include "utils.h" +pthread_mutex_t tag_pool_lock = PTHREAD_MUTEX_INITIALIZER; + #define NUM_SLOTS 4096 struct slot { -- cgit v1.2.3