diff options
author | dormando <dormando@rydia.net> | 2023-01-09 18:08:26 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-01-11 13:24:22 -0800 |
commit | fccf7b9efdfb0deb11f111496ce53c5892647dab (patch) | |
tree | a3c2f6bafee2d80a609806627bd3922e0aa6cd08 /items.h | |
parent | 8bb9d9a3e5ca93c38db97181d4c15b03d48a644d (diff) | |
download | memcached-fccf7b9efdfb0deb11f111496ce53c5892647dab.tar.gz |
core: remove *conn object from cache commands
We want to start using cache commands in contexts without a client
connection, but the client object has always been passed to all
functions.
In most cases we only need the worker thread (LIBEVENT_THREAD *t), so
this change adjusts the arguments passed in.
Diffstat (limited to 'items.h')
-rw-r--r-- | items.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,7 +11,7 @@ uint64_t get_cas_id(void); void set_cas_id(uint64_t new_cas); /*@null@*/ -item *do_item_alloc(char *key, const size_t nkey, const unsigned int flags, const rel_time_t exptime, const int nbytes); +item *do_item_alloc(const char *key, const size_t nkey, const unsigned int flags, const rel_time_t exptime, const int nbytes); item_chunk *do_item_alloc_chunk(item_chunk *ch, const size_t bytes_remain); item *do_item_alloc_pull(const size_t ntotal, const unsigned int id); void item_free(item *it); @@ -71,9 +71,9 @@ typedef struct { } item_stats_automove; void fill_item_stats_automove(item_stats_automove *am); -item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, conn *c, const bool do_update); -item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv, conn *c); -void do_item_bump(conn *c, item *it, const uint32_t hv); +item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, LIBEVENT_THREAD *t, const bool do_update); +item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv, LIBEVENT_THREAD *t); +void do_item_bump(LIBEVENT_THREAD *t, item *it, const uint32_t hv); void item_stats_reset(void); extern pthread_mutex_t lru_locks[POWER_LARGEST]; |