]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/io.h
ccan/io: remove io_state.
[ccan] / ccan / io / io.h
index 5bbe42a4ab38648d826bc08fce9f137f7b97e00c..cbd2b9be248b803daec99586001892e6e4e716c9 100644 (file)
@@ -34,12 +34,6 @@ enum io_result {
        RESULT_CLOSE
 };
 
-enum io_state {
-       IO_IO,
-       IO_IDLE,
-       IO_FINISHED
-};
-
 /**
  * struct io_plan - returned from a setup function.
  *
@@ -47,8 +41,9 @@ enum io_state {
  */
 struct io_plan {
        int pollflag;
-       enum io_state state;
+       /* Only NULL if idle. */
        enum io_result (*io)(struct io_conn *conn);
+       /* Only NULL if closing. */
        struct io_plan (*next)(struct io_conn *, void *arg);
        void *next_arg;