summaryrefslogtreecommitdiff
path: root/src/modules/manager/main.c
blob: 9e23097f9b7715b2ffc0ae2fa1c81f1342a00b8d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <gc/syscall.h>
#include <gc/mem.h>
#include <gc/server.h>
#include <gm/method.h>

struct method_ret handle_nothing(struct method_data *d) {
	if (d->blocking) printk("[manager] Received a {nothing} request.\n");
	else printk("[manager] Received a {nothing} message.\n");
	return mr_void();
}

int main() {
	printk("[manager] Manager module configuring...\n");
	Server *mgr = srv_get(0);

	srv_addHandler(mgr, M_NOTHING_VVVV, handle_nothing);

	printk("[manager] Manager module configured : starting request handling.\n");
	srv_handle(mgr, HA_LOOP);

	printk("[manager] Manager EPIC FAIL.\n");
	return 0;
}