summaryrefslogtreecommitdiff
path: root/storage.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2021-07-30 15:06:05 -0700
committerdormando <dormando@rydia.net>2021-08-09 17:09:08 -0700
commit57493bfca4d16f19aa6d591d29f19f3d2ad160f8 (patch)
tree24f78fa1f5b5842be2cf2ca7f108367f198d610c /storage.h
parentc25d0bd68ab0f6226c2d979bf0951923624926dd (diff)
downloadmemcached-57493bfca4d16f19aa6d591d29f19f3d2ad160f8.tar.gz
core: io_queue_t flow mode
instead of passing ownership of (io_queue_t)*q to the side thread, instead the ownership of IO objects are passed to the side thread, which are then individually returned. The worker thread runs return_cb() on each, determining when it's done with the response batch. this interface could use more explicit functions to make it more clear. Ownership of *q isn't actually "passed" anywhere, it's just used or not used depending on which return function the owner wants.
Diffstat (limited to 'storage.h')
-rw-r--r--storage.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage.h b/storage.h
index ca59102..9257c3f 100644
--- a/storage.h
+++ b/storage.h
@@ -18,9 +18,9 @@ bool storage_validate_item(void *e, item *it);
int storage_get_item(conn *c, item *it, mc_resp *resp);
// callbacks for the IO queue subsystem.
-void storage_submit_cb(void *ctx, void *stack);
-void storage_complete_cb(void *ctx, void *stack);
-void storage_finalize_cb(io_pending_t *pending);
+void storage_submit_cb(io_queue_t *q);
+void storage_complete_cb(io_queue_t *q);
+int storage_finalize_cb(io_pending_t *pending);
// Thread functions.
int start_storage_write_thread(void *arg);