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:

committed by
Max Kellermann

parent
194c8c3c0f
commit
3c4de5b560
@@ -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 {
|
||||
|
Reference in New Issue
Block a user