]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/benchmarks/run-different-speed.c
ccan/io: pass struct io_plan explicitly.
[ccan] / ccan / io / benchmarks / run-different-speed.c
index 10fa0b96ea2d1011a6e9d941ba76c5cedf194e61..537a67bbc01b5de934f63db04612e27d276f9415 100644 (file)
@@ -25,21 +25,21 @@ struct client {
        char reply_buffer[REPLY_SIZE];
 };
 
-static struct io_plan *write_reply(struct io_conn *conn, struct client *client);
-static struct io_plan *read_request(struct io_conn *conn, struct client *client)
+static struct io_plan write_reply(struct io_conn *conn, struct client *client);
+static struct io_plan read_request(struct io_conn *conn, struct client *client)
 {
        return io_read(conn, client->request_buffer, REQUEST_SIZE,
                       write_reply, client);
 }
 
 /* once we're done, loop again. */
-static struct io_plan *write_complete(struct io_conn *conn, struct client *client)
+static struct io_plan write_complete(struct io_conn *conn, struct client *client)
 {
        completed++;
        return read_request(conn, client);
 }
 
-static struct io_plan *write_reply(struct io_conn *conn, struct client *client)
+static struct io_plan write_reply(struct io_conn *conn, struct client *client)
 {
        return io_write(conn, client->reply_buffer, REPLY_SIZE,
                        write_complete, client);
@@ -106,12 +106,12 @@ static void sigalarm(int sig)
        write(timeout[1], "1", 1);
 }
 
-static struct io_plan *do_timeout(struct io_conn *conn, char *buf)
+static struct io_plan do_timeout(struct io_conn *conn, char *buf)
 {
        return io_break(conn, buf, NULL, NULL);
 }
 
-static struct io_plan *do_timeout_read(struct io_conn *conn, char *buf)
+static struct io_plan do_timeout_read(struct io_conn *conn, char *buf)
 {
        return io_read(conn, buf, 1, do_timeout, buf);
 }