-#define io_always(cb, arg) \
- io_debug(io_always_(typesafe_cb_preargs(struct io_plan, void *, \
- (cb), (arg), \
- struct io_conn *), \
- (arg)))
-struct io_plan io_always_(struct io_plan (*cb)(struct io_conn *, void *),
- void *arg);
+#define io_always(conn, next, arg) \
+ io_always_((conn), typesafe_cb_preargs(struct io_plan *, void *, \
+ (next), (arg), \
+ struct io_conn *), \
+ (arg))
+
+struct io_plan *io_always_(struct io_conn *conn,
+ struct io_plan *(*next)(struct io_conn *, void *),
+ void *arg);
+
+/**
+ * io_out_always - output plan to immediately call next callback
+ * @conn: the connection that plan is for.
+ * @next: function to call.
+ * @arg: @next argument
+ *
+ * This is a variant of io_always() which uses the output plan; it only
+ * matters if you are using io_duplex, and thus have two plans running at
+ * once.
+ */
+#define io_out_always(conn, next, arg) \
+ io_out_always_((conn), typesafe_cb_preargs(struct io_plan *, void *, \
+ (next), (arg), \
+ struct io_conn *), \
+ (arg))
+
+struct io_plan *io_out_always_(struct io_conn *conn,
+ struct io_plan *(*next)(struct io_conn *,
+ void *),
+ void *arg);