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

#define FACTOR 4

void thread2(void* d) {
	while (1) {
		printk("$");
		thread_sleep(35*FACTOR);
	}
}

int main() {
	printk("[module:test] Hi world !\n");
	printk("[module:test] Creating new thread...\n");
	thread_new(thread2, 0);
	while (1) {
		printk(".");
		thread_sleep(50*FACTOR);
	}
	return 0;
}