X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Fio_plan.h;h=b855e717921df3df528eca37b4c4947e0206bd70;hp=86be1d70d080721c1d490ae9c0e680e242470918;hb=c321a1d02755a77ae790d6e8976b2ff15edba89d;hpb=9e02685a6216720d37848a332187e3745b7f981e diff --git a/ccan/io/io_plan.h b/ccan/io/io_plan.h index 86be1d70..b855e717 100644 --- a/ccan/io/io_plan.h +++ b/ccan/io/io_plan.h @@ -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