diff options
Diffstat (limited to 'extra/memcached/0001-don-t-drop-to-a-condition-without-holding-the-lock.patch')
-rw-r--r-- | extra/memcached/0001-don-t-drop-to-a-condition-without-holding-the-lock.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/extra/memcached/0001-don-t-drop-to-a-condition-without-holding-the-lock.patch b/extra/memcached/0001-don-t-drop-to-a-condition-without-holding-the-lock.patch new file mode 100644 index 000000000..6cae41238 --- /dev/null +++ b/extra/memcached/0001-don-t-drop-to-a-condition-without-holding-the-lock.patch @@ -0,0 +1,35 @@ +From 9d635fa7f46f000d23663e0be3a900d2c51a3ed8 Mon Sep 17 00:00:00 2001 +From: dormando <dormando@rydia.net> +Date: Sat, 19 Apr 2014 12:15:29 -0700 +Subject: [PATCH 1/2] don't drop to a condition without holding the lock + +I am a moran. How do you even thread. +--- + items.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/items.c b/items.c +index 688ad03..3e2f71f 100644 +--- a/items.c ++++ b/items.c +@@ -764,6 +764,7 @@ static void item_crawler_evaluate(item *search, uint32_t hv, int i) { + static void *item_crawler_thread(void *arg) { + int i; + ++ pthread_mutex_lock(&lru_crawler_lock); + if (settings.verbose > 2) + fprintf(stderr, "Starting LRU crawler background thread\n"); + while (do_run_lru_crawler_thread) { +@@ -827,8 +828,8 @@ static void *item_crawler_thread(void *arg) { + STATS_LOCK(); + stats.lru_crawler_running = false; + STATS_UNLOCK(); +- pthread_mutex_unlock(&lru_crawler_lock); + } ++ pthread_mutex_unlock(&lru_crawler_lock); + if (settings.verbose > 2) + fprintf(stderr, "LRU crawler thread stopping\n"); + +-- +1.9.2 + |