summaryrefslogtreecommitdiff
path: root/memcached.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2020-08-29 23:46:52 -0700
committerdormando <dormando@rydia.net>2020-10-30 15:50:12 -0700
commite5326570b34ad3171e8d685e6bd17b58928d06cd (patch)
treebe03118b71dcd96df42bb26682a1a9f1e1e638d7 /memcached.h
parent416a7a10014299fd08bf4b35e4ffa0870cd330b0 (diff)
downloadmemcached-e5326570b34ad3171e8d685e6bd17b58928d06cd.tar.gz
core: compile io_queue code by default
don't gate on EXTSTORE for the deferred io_queue code. removes a number of ifdef's and allows more clean usage of the interface.
Diffstat (limited to 'memcached.h')
-rw-r--r--memcached.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/memcached.h b/memcached.h
index 08210f6..31687d8 100644
--- a/memcached.h
+++ b/memcached.h
@@ -611,8 +611,8 @@ typedef struct {
struct conn_queue *new_conn_queue; /* queue of new connections to handle */
cache_t *rbuf_cache; /* static-sized read buffers */
mc_resp_bundle *open_bundle;
-#ifdef EXTSTORE
cache_t *io_cache; /* IO objects */
+#ifdef EXTSTORE
void *storage; /* data object for storage system */
#endif
logger *l; /* logger buffer */
@@ -665,7 +665,7 @@ struct _mc_resp_bundle {
};
typedef struct conn conn;
-#ifdef EXTSTORE
+
#define IO_QUEUE_NONE 0
#define IO_QUEUE_EXTSTORE 1
typedef struct _io_pending_t {
@@ -690,7 +690,7 @@ typedef struct {
io_queue_free_cb free_cb;
int type;
} io_queue_t;
-#endif
+
/**
* The structure representing a connection into memcached.
*/
@@ -736,11 +736,9 @@ struct conn {
/* data for the swallow state */
int sbytes; /* how many bytes to swallow */
-#ifdef EXTSTORE
- int io_pending;
+ int io_pending; /* number of deferred IO requests */
io_queue_t io_queues[3]; /* set of deferred IO queues. */
bool io_queued; /* IO's were queued. */
-#endif
#ifdef EXTSTORE
unsigned int recache_counter;
#endif
@@ -815,10 +813,8 @@ enum delta_result_type do_add_delta(conn *c, const char *key,
uint64_t *cas, const uint32_t hv,
item **it_ret);
enum store_item_type do_store_item(item *item, int comm, conn* c, const uint32_t hv);
-#ifdef EXTSTORE
void conn_io_queue_add(conn *c, int type, void *ctx, io_queue_add_cb cb, io_queue_free_cb free_cb);
io_queue_t *conn_io_queue_get(conn *c, int type);
-#endif
conn *conn_new(const int sfd, const enum conn_states init_state, const int event_flags, const int read_buffer_size,
enum network_transport transport, struct event_base *base, void *ssl);