diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-22 21:25:56 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-22 21:25:56 -0600 |
commit | d0ece36e8a041cb3d58194c18d736a0ef9105e75 (patch) | |
tree | 01d4f45a761db36838399f65df2b20c2b3beec56 /srv9p.c | |
parent | 042220ed00c1b2642e8c3b7f68b858ec9c1e71d6 (diff) |
wip
Diffstat (limited to 'srv9p.c')
-rw-r--r-- | srv9p.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,11 +1,17 @@ #include <error.h> #include <stdio.h> + #include "coroutine.h" #include "net9p.h" int main() { - if (!coroutine_add(net9p_listen_cr, NULL)) - error(1, 0, "coroutine_add(net9p_listen_cr, NULL)"); + 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, NULL)) + error(1, 0, "coroutine_add(net9p_cr, NULL)"); coroutine_main(); return 1; |