summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-09-26 14:28:57 -0700
committerdormando <dormando@rydia.net>2017-09-26 14:44:15 -0700
commitf2a84a747457b7d6d0f961a3992735529debb8c4 (patch)
tree12e25ddc0e4069806073c486d50bf60daa6036a9 /items.c
parent4ce647a23128583b74822748a7f1411a75f50d51 (diff)
downloadmemcached-f2a84a747457b7d6d0f961a3992735529debb8c4.tar.gz
make lru_pull_tail function public
used in separate file for flash branch.
Diffstat (limited to 'items.c')
-rw-r--r--items.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/items.c b/items.c
index 6046cf1..97f8b67 100644
--- a/items.c
+++ b/items.c
@@ -79,19 +79,6 @@ void do_item_stats_add_crawl(const int i, const uint64_t reclaimed,
itemstats[i].crawler_items_checked += checked;
}
-#define LRU_PULL_EVICT 1
-#define LRU_PULL_CRAWL_BLOCKS 2
-#define LRU_PULL_RETURN_ITEM 4 /* fill info struct if available */
-
-struct lru_pull_tail_return {
- item *it;
- uint32_t hv;
-};
-
-static int lru_pull_tail(const int orig_id, const int cur_lru,
- const uint64_t total_bytes, const uint8_t flags, const rel_time_t max_age,
- struct lru_pull_tail_return *ret_it);
-
typedef struct _lru_bump_buf {
struct _lru_bump_buf *prev;
struct _lru_bump_buf *next;
@@ -1046,7 +1033,7 @@ item *do_item_touch(const char *key, size_t nkey, uint32_t exptime,
/* Returns number of items remove, expired, or evicted.
* Callable from worker threads or the LRU maintainer thread */
-static int lru_pull_tail(const int orig_id, const int cur_lru,
+int lru_pull_tail(const int orig_id, const int cur_lru,
const uint64_t total_bytes, const uint8_t flags, const rel_time_t max_age,
struct lru_pull_tail_return *ret_it) {
item *it = NULL;