Mercurial > lcfOS
diff kernel/kernel.c3 @ 402:0fb6633c42f6
Moved several files to logical locations
author | Windel Bouwman |
---|---|
date | Thu, 19 Feb 2015 00:13:07 +0100 |
parents | kernel/src/kernel.c3@6ae782a085e0 |
children | 9eb1fc6aad6c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kernel/kernel.c3 Thu Feb 19 00:13:07 2015 +0100 @@ -0,0 +1,39 @@ +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(); +} +