feat(pl/pc): add APIC timer support

This commit is contained in:
Loïc Grégoire
2026-04-18 11:18:33 -04:00
parent 1aa6743f43
commit a1db75746a
13 changed files with 175 additions and 48 deletions
+3 -1
View File
@@ -50,11 +50,13 @@ var tc: ke.TimeCounter = .{
};
pub fn init() void {
var act: posix.Sigaction = undefined;
var act = std.mem.zeroes(posix.Sigaction);
act.handler.sigaction = timer_handler;
act.flags = posix.SA.RESTART | posix.SA.SIGINFO;
act.mask = posix.sigfillset();
posix.sigaction(posix.SIG.ALRM, &act, null);
ke.time.register_source(&tc);