summaryrefslogtreecommitdiff
path: root/9psrv.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-18 00:04:10 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-18 00:04:10 -0600
commit690a9d955e65608b96fad34a2b31e639223798aa (patch)
tree60bf87a326b6433297ee86e8d039199e4d4becdb /9psrv.c
parent4412b908755c7b9899cf8cce4e0985aa6816121a (diff)
wip
Diffstat (limited to '9psrv.c')
-rw-r--r--9psrv.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/9psrv.c b/9psrv.c
index e120eff..5b8cf82 100644
--- a/9psrv.c
+++ b/9psrv.c
@@ -1,13 +1,14 @@
+#include <error.h>
+#include <stdio.h>
#include "coroutine.h"
#include "net9p.h"
int main() {
coroutine_init();
- net9p_listen_stack_t stack = {0};
- coroutine_add(net9p_listen_cr, &stack);
+ if (!coroutine_add(net9p_listen_cr, NULL))
+ error(1, 0, "coroutine_add(net9p_listen_cr, NULL)");
- for (;;) {
- coroutine_task();
- }
+ coroutine_main();
+ return 1;
}