summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-08-28 23:32:33 +0200
committerMichal Idziorek <m.i@gmx.at>2014-08-28 23:32:33 +0200
commit88fa56f1f6cbb99d865b9040003af0b46a6a1725 (patch)
tree36785b34a769f92404e2fba63e52f714acaf219b /kernel
parent5faeb6be7b75a57d7a73df1ac18f8994f3f3c49e (diff)
solved mystery of logging from interrupt handlers!
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kernel.c10
-rw-r--r--kernel/keyboard.c6
2 files changed, 13 insertions, 3 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c
index 898994c..df5e276 100644
--- a/kernel/kernel.c
+++ b/kernel/kernel.c
@@ -5,7 +5,7 @@
#include "../lib/logger/log.h" // logger facilities
#define FOOLOS_MODULE_NAME "kernel"
-// TODO: cleanup . how can i compile it without the includes!??
+// TODO: cleanup . WHHYY can i compile it without the includes!??
///////
// interrupt handler prototypes
@@ -21,12 +21,18 @@ void int_floppy_handler();
// just a test handler for software interrupt 88, todo: remove and
// implement some syscalls!
//
+void int_test_handler_worker()
+{
+ // this can not be called directly from interrupt handler
+ // due to optional parameters (...) probably!
+ log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"irq 88");
+}
void int_test_handler()
{
X86_IRQ_BEGIN
+ int_test_handler_worker();
sleep(30);
X86_IRQ_END
-
}
// heart of our operating system.
diff --git a/kernel/keyboard.c b/kernel/keyboard.c
index 9b81682..653d2ba 100644
--- a/kernel/keyboard.c
+++ b/kernel/keyboard.c
@@ -1,5 +1,7 @@
#include "kernel.h"
#include "console.h"
+#include "../lib/logger/log.h" // logger facilities
+#define FOOLOS_MODULE_NAME "keyboard"
/// keyboard driver ////
@@ -124,7 +126,7 @@ void keyboard_handle(uint8_t in)
}
-__attribute__((interrupt( irq ))) void int_kb_handler()
+void int_kb_handler()
{
__asm__("pusha");
@@ -139,6 +141,8 @@ __attribute__((interrupt( irq ))) void int_kb_handler()
//scr_put_string("irq 1 -> kb scancodes : ");
//scr_put_hex(kb_in);
+
+
keyboard_handle(kb_in); //TODO!!
// send EOI to primary PIC