From 8ec1588722809a35a7d149bff10de56424e2658a Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 25 Nov 2020 17:58:50 -0800 Subject: src: initial commit of jio WIP source This is a very quick and dirty experimental hack written in some sort of bastard continuation-passing style in C w/io_uring using journal-file introspection and manipulation duty as an excuse for its existence. Consider this unfinished prototype quality code. --- src/op.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/op.h (limited to 'src/op.h') diff --git a/src/op.h b/src/op.h new file mode 100644 index 0000000..ccb1932 --- /dev/null +++ b/src/op.h @@ -0,0 +1,13 @@ +#ifndef _JIO_OP_H +#define _JIO_OP_H + +#include +#include + +/* ergonomic helper for submitting a thunk_t as a cb+cb_data pair to iou_op_queue() */ +static inline void op_queue(iou_t *iou, iou_op_t *op, thunk_t *thunk) +{ + return iou_op_queue(iou, op, (int (*)(void *))thunk->dispatch, thunk); +} + +#endif -- cgit v1.2.3