summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/sbc_harness/main.c')
-rw-r--r--cmd/sbc_harness/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c
index 25b122c..20cf5b1 100644
--- a/cmd/sbc_harness/main.c
+++ b/cmd/sbc_harness/main.c
@@ -153,7 +153,15 @@ static COROUTINE read9p_cr(void *) {
lo_interface net_iface iface = lo_box_w5500_if_as_net_iface(&globals.dev_w5500);
lo_interface net_stream_listener listener = LO_CALL(iface, tcp_listen, LIB9P_DEFAULT_PORT_9FS);
- lib9p_srv_read_cr(&globals.srv, listener);
+ lib9p_srv_accept_and_read_loop(&globals.srv, listener);
+
+ cr_end();
+}
+
+static COROUTINE write9p_cr(void *) {
+ cr_begin();
+
+ lib9p_srv_worker_loop(&globals.srv);
cr_end();
}
@@ -221,7 +229,7 @@ COROUTINE init_cr(void *) {
}
for (int i = 0; i < CONFIG_9P_SRV_MAX_REQS*_CONFIG_9P_NUM_SOCKS; i++) {
char name[] = {'w', 'r', 'i', 't', 'e', '-', hexdig[i], '\0'};
- coroutine_add(name, lib9p_srv_write_cr, &globals.srv);
+ coroutine_add(name, write9p_cr, NULL);
}
cr_exit();
@@ -234,4 +242,5 @@ int main() {
infof("===================================================================");
coroutine_add("init", init_cr, NULL);
coroutine_main();
+ assert_notreached("all coroutines exited");
}