summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-17 21:51:39 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-19 20:20:49 -0700
commit8f0b3cd60bd9c41245aba9308efd26f4672e5395 (patch)
treeb4f3a447931c1ab4735d05406c4357e48f9e1670
parentb0f92280f297b195d9a8f3e1d26d752bd2109381 (diff)
cmd/srv9p: "Test" sleep
-rw-r--r--cmd/srv9p/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/srv9p/main.c b/cmd/srv9p/main.c
index ac61625..d0a683a 100644
--- a/cmd/srv9p/main.c
+++ b/cmd/srv9p/main.c
@@ -10,6 +10,7 @@
#include <lib9p/srv.h>
#include <libcr/coroutine.h>
#include <libhw/generic/net.h>
+#include <libhw/generic/alarmclock.h>
#include <libhw/host_net.h>
#include "static9p.h"
@@ -112,11 +113,13 @@ static COROUTINE init_cr(void *) {
char name[] = {'r', 'e', 'a', 'd', '-', hexdig[i], '\0'};
if (!coroutine_add(name, read_cr, &srv))
error(1, 0, "coroutine_add(read_cr, &srv)");
+ sleep_for_s(1);
}
for (int i = 0; i < 2*CONFIG_SRV9P_NUM_CONNS; i++) {
char name[] = {'w', 'r', 'i', 't', 'e', '-', hexdig[i], '\0'};
if (!coroutine_add(name, lib9p_srv_write_cr, &srv))
error(1, 0, "coroutine_add(lib9p_srv_write_cr, &srv)");
+ sleep_for_s(1);
}
cr_exit();