X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-10-many.c;h=3339a335ff2c707453ba7d5fa03c8694a0aa13e0;hb=94dd4c2bddd0dc080ad5b85465fa3f45f486967a;hp=b70310dd865ed3eaa0047216dbad941e6169a19a;hpb=cdffdf5d61f8330cfc3467e73a84876eb3928e9b;p=ccan diff --git a/ccan/io/test/run-10-many.c b/ccan/io/test/run-10-many.c index b70310dd..3339a335 100644 --- a/ccan/io/test/run-10-many.c +++ b/ccan/io/test/run-10-many.c @@ -34,7 +34,7 @@ static struct io_plan *poke_writer(struct io_conn *conn, struct buffer *buf) io_wake(&buf->writer); /* I'll wait until you wake me. */ - return io_wait(conn, &buf->reader, IO_IN, read_buf, buf); + return io_wait(conn, &buf->reader, read_buf, buf); } static struct io_plan *write_buf(struct io_conn *conn, struct buffer *buf) @@ -52,12 +52,12 @@ static struct io_plan *poke_reader(struct io_conn *conn, struct buffer *buf) return io_close(conn); /* I'll wait until you tell me to write. */ - return io_wait(conn, &buf->writer, IO_OUT, write_buf, buf); + return io_wait(conn, &buf->writer, write_buf, buf); } static struct io_plan *setup_reader(struct io_conn *conn, struct buffer *buf) { - return io_wait(conn, &buf->reader, IO_IN, read_buf, buf); + return io_wait(conn, &buf->reader, read_buf, buf); } static struct buffer buf[NUM]; @@ -101,7 +101,7 @@ int main(void) ok1(buf[i].writer); /* They should eventually exit */ - ok1(io_loop() == NULL); + ok1(io_loop(NULL, NULL) == NULL); for (i = 0; i < NUM; i++) { char b[sizeof(buf[0].buf)];