kuro/kuro.c

28 lines
491 B
C
Raw Permalink Normal View History

2024-01-22 07:50:23 +00:00
#include "dat.h"
#include "fns.h"
static char* mtpt;
2024-01-31 05:53:42 +00:00
void srvthread(void* arg) {
Node* vm = (Node*)arg;
start_9p(vm);
2024-01-22 07:50:23 +00:00
}
void threadmain(int argc, char **argv)
{
mtpt = getenv("KURO_MTPT");
if (mtpt == nil) {
sysfatal("KURO_MTPT not set");
}
print("KURO_MTPT=%s\n", mtpt);
2024-01-27 05:39:39 +00:00
2024-01-31 05:53:42 +00:00
/* ARGBEGIN{
2024-01-22 07:50:23 +00:00
2024-01-31 05:53:42 +00:00
}ARGEND */
2024-01-27 05:39:39 +00:00
2024-01-31 05:53:42 +00:00
Node* vm = create_node(argc > 0 ? argv[0] : nil);
proccreate(srvthread, (void*)vm, 4096);
supervise_node(vm);
2024-01-27 05:39:39 +00:00
threadexitsall(0);
2024-01-22 07:50:23 +00:00
}