1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-16 00:00:06 +01:00

add example to test the timer

This commit is contained in:
Stefan Lankes 2015-06-27 20:12:28 +02:00
parent 73a5ae0c11
commit 1e41214cad

View file

@ -69,7 +69,12 @@ extern atomic_int32_t cpu_online;
static int foo(void* arg)
{
int i;
for(i=0; i<5; i++) {
kprintf("hello from %s\n", (char*) arg);
sleep(1);
}
return 0;
}
@ -144,6 +149,7 @@ int main(void)
kprintf("Current available memory: %lu KiB\n", atomic_int32_read(&total_available_pages) * PAGE_SIZE / 1024);
create_kernel_task(NULL, foo, "foo1", NORMAL_PRIO);
create_kernel_task(NULL, foo, "foo2", NORMAL_PRIO);
init_netifs();