mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-30 06:48:22 +00:00
feat(pl/pc): add APIC timer support
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user