diff options
author | Richard Braun <rbraun@sceen.net> | 2012-11-19 01:19:20 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2012-11-19 01:19:20 +0100 |
commit | c1d914895fa08f5263a1c6421e65c82622b2fd59 (patch) | |
tree | 4fd1865bb7c746a4b4ab5379b5f616cbdb430ff4 /kern/kernel.c | |
parent | 426d69f9c87875cc8d6b48f1f096f904c1998896 (diff) |
kern/thread: preliminary scheduling implementation
This change adds periodic timer interrupt reporting to the thread
module, basic thread selection, and context switching. It currently
only applies to the main processor. The x86/tcb module has been
drastically simplified as a side effect.
Diffstat (limited to 'kern/kernel.c')
-rw-r--r-- | kern/kernel.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kern/kernel.c b/kern/kernel.c index 7c83d8d1..9e7f0435 100644 --- a/kern/kernel.c +++ b/kern/kernel.c @@ -27,10 +27,6 @@ kernel_setup(void *arg) { (void)arg; - cpu_mp_setup(); - - cpu_intr_enable(); - for (;;) cpu_idle(); } @@ -43,13 +39,14 @@ kernel_main(void) task_setup(); thread_setup(); + cpu_mp_setup(); error = thread_create(&thread, "core", kernel_task, kernel_setup, NULL); if (error) panic("kernel: unable to create kernel thread"); - thread_load(thread); + thread_run(); /* Never reached */ } |