diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-14 22:37:35 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-14 22:37:35 +0100 |
commit | 73cf3eddd480f2bd7e987c58da82c243861a5314 (patch) | |
tree | b6cf499e261cd2e4d87bd08b499ebdf1b97adf90 /src/kernel/core/thread.c | |
parent | fcc321d0ef1771edff61a986df62d2cda2d7485e (diff) | |
download | kogata-73cf3eddd480f2bd7e987c58da82c243861a5314.tar.gz kogata-73cf3eddd480f2bd7e987c58da82c243861a5314.zip |
Many things :
- fix context switching (it actually worked only because of optimizations!)
- complete mchmap implementation
- adjust elf parser to load binaries correctly even without FM_MMAP
Diffstat (limited to 'src/kernel/core/thread.c')
-rw-r--r-- | src/kernel/core/thread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/core/thread.c b/src/kernel/core/thread.c index cc39eb2..e62b5a8 100644 --- a/src/kernel/core/thread.c +++ b/src/kernel/core/thread.c @@ -8,7 +8,6 @@ #include <paging.h> void save_context_and_enter_scheduler(saved_context_t *ctx); -void irq0_save_context_and_enter_scheduler(saved_context_t *ctx); void resume_context(saved_context_t *ctx); thread_t *current_thread = 0; @@ -156,8 +155,9 @@ thread_t *new_thread(entry_t entry, void* data) { // ========== // static void irq0_handler(registers_t *regs) { - if (current_thread != 0) - irq0_save_context_and_enter_scheduler(¤t_thread->ctx); + if (current_thread != 0) { + save_context_and_enter_scheduler(¤t_thread->ctx); + } } void threading_setup(entry_t cont, void* arg) { set_pit_frequency(TASK_SWITCH_FREQUENCY); |