summaryrefslogtreecommitdiff
path: root/net9p.c
diff options
context:
space:
mode:
Diffstat (limited to 'net9p.c')
-rw-r--r--net9p.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net9p.c b/net9p.c
index 894b4fe..a9c9025 100644
--- a/net9p.c
+++ b/net9p.c
@@ -9,11 +9,10 @@
#include <arpa/inet.h>
#include "net9p.h"
-#include "coroutine.h"
void net9p_listen_cr(void *_arg) {
(void)_arg;
- printf("listen initializng...\n");
+ printf("listen initializing...\n");
cr_begin();
printf("listen running...\n");
@@ -37,6 +36,7 @@ void net9p_listen_cr(void *_arg) {
int conn = 9;
if (!coroutine_add(net9p_worker_cr, &conn))
error(1, 0, "coroutine_add(net9p_worker_cr, &%d)", conn);
+ printf("im back...\n");
for (;;) {
cr_yield();
}
@@ -46,10 +46,11 @@ void net9p_listen_cr(void *_arg) {
void net9p_worker_cr(void *_arg) {
int fd = *((int *)_arg);
+ printf("worker %zu initializing...\n", cr_getcid());
cr_begin();
- printf("worker %zu\n", cr_getcid());
- close(fd);
+ printf("worker %zu running...\n", cr_getcid());
+ //close(fd);
cr_end();
}