aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/timer/timer.c
diff options
context:
space:
mode:
authorMarvin Borner2019-09-21 18:07:07 +0200
committerMarvin Borner2019-09-21 18:07:07 +0200
commitc31d465a62fbc0ec3194838db4745585471c1050 (patch)
tree10e544bc856ea1898e39d6c9304f746aa1d74670 /src/kernel/timer/timer.c
parentd91024fb750356bad65cce5bdef206e530b37c53 (diff)
Added ACPI based shutdown command
Diffstat (limited to 'src/kernel/timer/timer.c')
-rw-r--r--src/kernel/timer/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kernel/timer/timer.c b/src/kernel/timer/timer.c
index 38f5be6..45b254e 100644
--- a/src/kernel/timer/timer.c
+++ b/src/kernel/timer/timer.c
@@ -5,9 +5,9 @@ volatile unsigned int timer_ticks = 0;
void timer_phase(int hz) {
int divisor = 1193180 / hz;
- send(0x43, 0x36); // 01 10 11 0b // CTR, RW, MODE, BCD
- send(0x40, divisor & 0xFF);
- send(0x40, divisor >> 8);
+ send_b(0x43, 0x36); // 01 10 11 0b // CTR, RW, MODE, BCD
+ send_b(0x40, divisor & 0xFF);
+ send_b(0x40, divisor >> 8);
}
// Executed 100 times per second
@@ -21,7 +21,7 @@ void timer_wait(int ticks) {
eticks = timer_ticks + ticks;
while (timer_ticks < eticks) {
- __asm__ __volatile__ ("sti//hlt//cli");
+ asm volatile ("sti//hlt//cli");
}
}