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)
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];
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)];