summaryrefslogtreecommitdiff
path: root/srv9p.c
blob: 822a9ea2bc13106be753f5d737452d22a9bfb2e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <error.h>
#include <stdio.h>

#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;
}