X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Fbackend.h;h=aace0f2bad38d96a6835da31a2a2edf9f020ea6a;hb=96dcdfbf1a400f7cb43cf3f0761f52fd6de9ff65;hp=2c03a98a1a4632917ad810f6e1d74d37813d52df;hpb=43185ec669720903fa86aac5f2d1b1ee62e3a12b;p=ccan diff --git a/ccan/io/backend.h b/ccan/io/backend.h index 2c03a98a..aace0f2b 100644 --- a/ccan/io/backend.h +++ b/ccan/io/backend.h @@ -4,6 +4,7 @@ #include #include #include "io_plan.h" +#include struct fd { int fd; @@ -58,12 +59,9 @@ struct io_plan { /* One connection per client. */ struct io_conn { struct fd fd; - bool debug; - /* For duplex to save. */ - bool debug_saved; - /* always or closing list. */ - struct io_conn *list; + /* always and closing lists. */ + struct list_node always, closing; void (*finish)(struct io_conn *, void *arg); void *finish_arg; @@ -88,6 +86,6 @@ void backend_del_conn(struct io_conn *conn); void io_ready(struct io_conn *conn, int pollflags); void io_do_always(struct io_conn *conn); -void io_do_wakeup(struct io_conn *conn, struct io_plan *plan); +void io_do_wakeup(struct io_conn *conn, enum io_direction dir); void *do_io_loop(struct io_conn **ready); #endif /* CCAN_IO_BACKEND_H */