summaryrefslogtreecommitdiff
path: root/src/op.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/op.h')
-rw-r--r--src/op.h13
1 files changed, 13 insertions, 0 deletions
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 <iou.h>
+#include <thunk.h>
+
+/* 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
© All Rights Reserved