view kernel/src/kernel.c3 @ 399:a7c444404df9

Fix hexwrite
author Windel Bouwman
date Fri, 20 Jun 2014 16:36:49 +0200
parents 6ae782a085e0
children
line wrap: on
line source

module kernel;

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

// 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??
    // Create a second process:
    process.Create();

    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();
}