summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2015-01-09 18:45:17 -0800
committerdormando <dormando@rydia.net>2015-01-09 18:45:17 -0800
commit90a59871d95720084cbab11249dc62d6262d1409 (patch)
treed9bf8b57186fd5ac615657fe84c39443affd79a6
parent09e15d5c3b11ff7d4e4709e5e8b54fdbae8d4f51 (diff)
downloadmemcached-90a59871d95720084cbab11249dc62d6262d1409.tar.gz
ding-dong the cache_lock is dead.
-rw-r--r--items.h1
-rw-r--r--thread.c5
2 files changed, 1 insertions, 5 deletions
diff --git a/items.h b/items.h
index 7497d0d..b091fa0 100644
--- a/items.h
+++ b/items.h
@@ -24,7 +24,6 @@ void item_stats_sizes(ADD_STAT add_stats, void *c);
item *do_item_get(const char *key, const size_t nkey, const uint32_t hv);
item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv);
void item_stats_reset(void);
-extern pthread_mutex_t cache_lock;
extern pthread_mutex_t lru_locks[POWER_LARGEST];
void item_stats_evictions(uint64_t *evicted);
diff --git a/thread.c b/thread.c
index eef90eb..29f6c0e 100644
--- a/thread.c
+++ b/thread.c
@@ -36,9 +36,7 @@ struct conn_queue {
pthread_mutex_t lock;
};
-/* Lock for cache LRU operations
- * Was old global lock for all item_*, assoc_*, etc operations */
-pthread_mutex_t cache_lock;
+/* Locks for cache LRU operations */
pthread_mutex_t lru_locks[POWER_LARGEST];
/* Connection lock around accepting new connections */
@@ -727,7 +725,6 @@ void memcached_thread_init(int nthreads, struct event_base *main_base) {
int i;
int power;
- pthread_mutex_init(&cache_lock, NULL);
for (i = 0; i < POWER_LARGEST; i++) {
pthread_mutex_init(&lru_locks[i], NULL);
}