Newer
Older
tree-os / src / kernel / lib / task / osTasks.c
@lukas lukas on 2 Apr 406 bytes cleanup
#include <lib/task/osTasks.h>
#include <lib/task/task.h>
#include <lib/textMode/stdio.h>
#include <stdint.h>

Task mainTask;
Task testTask;

void testMain() {
    printf("Hello from another task!\n");
    yields();
    printf("wait. . . Hello again\n");
    yield();
}

void initOSTasks() {
    setRunningTask(&mainTask);
    createTask(&testTask, (uint32_t) testMain, 0x0, 0x0);
    schedule(&testTask);
}