From 09982d80c45805715984cc1cae96c37e4fc148c3 Mon Sep 17 00:00:00 2001 From: hachem Date: Fri, 25 Sep 2026 21:21:09 +0200 Subject: feat: scheduler + cleanup --- boot/timer.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'boot/timer.zig') 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.*; } -- cgit v1.3