summaryrefslogtreecommitdiff
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2014-08-20 15:55:03 +0200
committerMichal Idziorek <m.i@gmx.at>2014-08-20 15:55:03 +0200
commitdc164927e71d760a41494ab1edf8e3deeda401db (patch)
tree65253b4a5e443c599341d5972b58449388a4b2b1 /kernel/timer.c
parent46063e75f3f81dfb532fa5772c88e9027a0faebd (diff)
started implementing floppy driver etc.
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index da62f78..b4787b9 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -32,6 +32,7 @@
*/
#include "kernel.h"
+#include "x86.h"
static uint64_t timer64=0;
static uint8_t timer8=0;
@@ -40,12 +41,10 @@ uint16_t timer16=0;
// clock handler
void int_clock_handler()
{
- __asm__("pusha");
-
+ X86_IRQ_BEGIN;
timer64++;
-
#ifdef DEBUG
timer8++;
@@ -64,17 +63,7 @@ void int_clock_handler()
timer8=0;
}
- // todo also the other pic!// TODO
- __asm__("mov $0x20, %al");
- __asm__("out %al, $0x20");
- //
-
- __asm__("popa");
- __asm__("leave");
- __asm__("iret");
- __asm__("popa");
- __asm__("leave");
- __asm__("iret");
+ X86_IRQ_END;
}