]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/io_plan.h
ccan/io: flatten debug callchain further.
[ccan] / ccan / io / io_plan.h
index 86be1d70d080721c1d490ae9c0e680e242470918..b855e717921df3df528eca37b4c4947e0206bd70 100644 (file)
@@ -80,6 +80,15 @@ extern bool (*io_debug_conn)(struct io_conn *conn);
  */
 struct io_plan io_debug(struct io_plan plan);
 
+/**
+ * io_debug_io - return from function which actually does I/O.
+ *
+ * This determines if we are debugging the current connection: if so,
+ * it immediately sets the next function and calls into io_loop() to
+ * create a linear call chain.
+ */
+int io_debug_io(int ret);
+
 /**
  * io_plan_no_debug - mark the next plan not to be called immediately.
  *
@@ -99,6 +108,10 @@ static inline struct io_plan io_debug(struct io_plan plan)
 {
        return plan;
 }
+static inline int io_debug_io(int ret)
+{
+       return ret;
+}
 #define io_plan_no_debug() (void)0
 #endif