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.
This commit is contained in:
Eric Wong
2008-09-07 19:14:45 +02:00
committed by Max Kellermann
parent 194c8c3c0f
commit 3c4de5b560
3 changed files with 15 additions and 6 deletions

View File

@@ -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 {