diff options
Diffstat (limited to '')
-rw-r--r-- | src/tag.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -247,9 +247,9 @@ static void deleteItem(struct tag *tag, int idx) assert(idx < tag->numOfItems); tag->numOfItems--; - pthread_mutex_lock(&tag_pool_lock); + g_mutex_lock(tag_pool_lock); tag_pool_put_item(tag->items[idx]); - pthread_mutex_unlock(&tag_pool_lock); + g_mutex_unlock(tag_pool_lock); if (tag->numOfItems - idx > 0) { memmove(tag->items + idx, tag->items + idx + 1, @@ -281,10 +281,10 @@ void tag_free(struct tag *tag) { int i; - pthread_mutex_lock(&tag_pool_lock); + g_mutex_lock(tag_pool_lock); for (i = tag->numOfItems; --i >= 0; ) tag_pool_put_item(tag->items[i]); - pthread_mutex_unlock(&tag_pool_lock); + g_mutex_unlock(tag_pool_lock); if (tag->items == bulk.items) { #ifndef NDEBUG @@ -311,10 +311,10 @@ struct tag *tag_dup(const struct tag *tag) ret->numOfItems = tag->numOfItems; ret->items = ret->numOfItems > 0 ? g_malloc(items_size(tag)) : NULL; - pthread_mutex_lock(&tag_pool_lock); + g_mutex_lock(tag_pool_lock); for (i = 0; i < tag->numOfItems; i++) ret->items[i] = tag_pool_dup_item(tag->items[i]); - pthread_mutex_unlock(&tag_pool_lock); + g_mutex_unlock(tag_pool_lock); return ret; } @@ -444,9 +444,9 @@ static void appendToTagItems(struct tag *tag, enum tag_type type, items_size(tag) - sizeof(struct tag_item *)); } - pthread_mutex_lock(&tag_pool_lock); + g_mutex_lock(tag_pool_lock); tag->items[i] = tag_pool_get_item(type, p, len); - pthread_mutex_unlock(&tag_pool_lock); + g_mutex_unlock(tag_pool_lock); g_free(duplicated); } |