view kernel/kernel.c3 @ 406:b1daa462ee17

Made kernel run again
author Windel Bouwman
date Fri, 20 Feb 2015 14:25:35 +0100
parents 0fb6633c42f6
children 9eb1fc6aad6c
line wrap: on
line source

module kernel;

import memory;
import process;
import scheduler;
import arch;
import io;
import debug;

// Globals:
var process.process_t* init_proc;


// Main entry point of the kernel:
function void start()
{
    io.println("Welcome to lcfos!");
    arch.init();

    process.init();
    memory.init();

    init_proc = process.create();

    // TODO: copy content into process??

    io.print2("init address ", cast<int>(init_proc));

    //scheduler:queue(proc);
    io.println("Kernel finished");
    panic();
}

// Called in total stress:
function void panic()
{
    arch.halt();
}