From 71e1a86a033c380f85dd300d788af63bfef25bab Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 26 Sep 2024 19:36:54 -0600 Subject: wip reorg --- cmd/srv9p/main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cmd/srv9p/main.c (limited to 'cmd/srv9p') diff --git a/cmd/srv9p/main.c b/cmd/srv9p/main.c new file mode 100644 index 0000000..822a9ea --- /dev/null +++ b/cmd/srv9p/main.c @@ -0,0 +1,18 @@ +#include +#include + +#include "coroutine.h" +#include "net9p.h" + +int main() { + int sock = netio_listen(9000); + if (sock < 0) + error(1, -sock, "netio_listen"); + + for (int i = 0; i < 8; i++) + if (!coroutine_add(net9p_cr, &sock)) + error(1, 0, "coroutine_add(net9p_cr, NULL)"); + + coroutine_main(); + return 1; +} -- cgit v1.2.3-2-g168b