hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/boot/timer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'boot/timer.zig')
-rw-r--r--boot/timer.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/boot/timer.zig b/boot/timer.zig
index 4569d6a..428c695 100644
--- a/boot/timer.zig
+++ b/boot/timer.zig
@@ -1,17 +1,17 @@
-// PIT channel 0 tick counter
-// configuring the PIT itself (outb to 0x43/0x40) is done in revo (kernel
-// `pit_init`), since it's just port writes the VM can drive
+// pit channel 0 tick counter
+// configuring the pit itself (outb to 0x43/0x40) is done in revo (kernel
+// `pit_init`), since its just port writes the vm can drive
var ticks: u64 = 0;
-// called from the IRQ0 handler
+// called from the irq0 handler
pub fn onIrq() void {
- const t: *volatile u64 = &ticks;
- t.* +%= 1;
+ const ticks_ptr: *volatile u64 = &ticks;
+ ticks_ptr.* +%= 1;
}
// called from the event loop
pub fn now() u64 {
- const t: *volatile u64 = &ticks;
- return t.*;
+ const ticks_ptr: *volatile u64 = &ticks;
+ return ticks_ptr.*;
}