Merge pull request #52 from SamTebbs33/feature/arch-register-int-handler
Add arch.registerInterruptHandler
This commit is contained in:
commit
a3d1c2a6c5
2 changed files with 20 additions and 0 deletions
|
@ -178,3 +178,14 @@ pub fn haltNoInterrupts() noreturn {
|
||||||
halt();
|
halt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Register an interrupt handler. The interrupt number should be the arch-specific number.
|
||||||
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// IN int: u16 - The arch-specific interrupt number to register for.
|
||||||
|
/// IN handler: fn (ctx: *InterruptContext) void - The handler to assign to the interrupt.
|
||||||
|
///
|
||||||
|
pub fn registerInterruptHandler(int: u16, handler: fn (ctx: *InterruptContext) void) void {
|
||||||
|
irq.registerIrq(int, handler);
|
||||||
|
}
|
||||||
|
|
|
@ -30,3 +30,12 @@ pub fn inb(port: u16) u8 {return 0;}
|
||||||
/// event being waited.
|
/// event being waited.
|
||||||
///
|
///
|
||||||
pub fn ioWait() void {}
|
pub fn ioWait() void {}
|
||||||
|
|
||||||
|
///
|
||||||
|
/// Register an interrupt handler. The interrupt number should be the arch-specific number.
|
||||||
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// IN int: u16 - The arch-specific interrupt number to register for.
|
||||||
|
/// IN handler: fn (ctx: *InterruptContext) void - The handler to assign to the interrupt.
|
||||||
|
///
|
||||||
|
pub fn registerInterruptHandler(int: u16, ctx: fn (ctx: *InterruptContext) void) void {}
|
||||||
|
|
Loading…
Reference in a new issue