summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
Diffstat (limited to 'items.c')
-rw-r--r--items.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/items.c b/items.c
index 6546f88..84011c4 100644
--- a/items.c
+++ b/items.c
@@ -44,7 +44,7 @@ static unsigned int sizes[LARGEST_ID];
void item_stats_reset(void) {
mutex_lock(&cache_lock);
memset(itemstats, 0, sizeof(itemstats));
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
}
@@ -125,7 +125,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim
} else if ((it = slabs_alloc(ntotal, id)) == NULL) {
if (settings.evict_to_free == 0) {
itemstats[id].outofmemory++;
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
return NULL;
}
itemstats[id].evicted++;
@@ -181,7 +181,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim
search->refcount = 1;
do_item_unlink_nolock(search, hash(ITEM_key(search), search->nkey, 0));
}
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
return NULL;
}
@@ -192,7 +192,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim
* been removed from the slab LRU.
*/
it->refcount = 1; /* the caller will have a reference */
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
it->next = it->prev = it->h_next = 0;
it->slabs_clsid = id;
@@ -298,7 +298,7 @@ int do_item_link(item *it, const uint32_t hv) {
assoc_insert(it, hv);
item_link_q(it);
refcount_incr(&it->refcount);
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
return 1;
}
@@ -316,7 +316,7 @@ void do_item_unlink(item *it, const uint32_t hv) {
item_unlink_q(it);
do_item_remove(it);
}
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
}
/* FIXME: Is it necessary to keep this copy/pasted code? */
@@ -354,7 +354,7 @@ void do_item_update(item *it) {
it->time = current_time;
item_link_q(it);
}
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
}
}
@@ -413,7 +413,7 @@ void item_stats_evictions(uint64_t *evicted) {
for (i = 0; i < LARGEST_ID; i++) {
evicted[i] = itemstats[i].evicted;
}
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
}
void do_item_stats(ADD_STAT add_stats, void *c) {
@@ -505,7 +505,7 @@ item *do_item_get(const char *key, const size_t nkey, const uint32_t hv) {
it = NULL;
}
}
- pthread_mutex_unlock(&cache_lock);
+ mutex_unlock(&cache_lock);
int was_found = 0;
if (settings.verbose > 2) {