Skip to content

Commit

Permalink
ding-dong the cache_lock is dead.
Browse files Browse the repository at this point in the history
  • Loading branch information
dormando committed Jan 10, 2015
1 parent 09e15d5 commit 90a5987
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion items.h
Expand Up @@ -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);

Expand Down
5 changes: 1 addition & 4 deletions thread.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 90a5987

Please sign in to comment.