upgrade api to use the new irq enum discipline

I think this commit message got swapped with the previous one,
the hazards of autocomplete.
This commit is contained in:
bunnie 2024-03-08 16:21:21 +08:00
parent 167cd04f06
commit b2cd829adb

View file

@ -113,12 +113,21 @@ impl SwapperSharedState {
} }
/// blocking swap call handler /// blocking swap call handler
/// `arg` is a pointer to an argument block. It encodes the opcode and other parameters used by the handler: /// 8 argument values are always pushed on the stack; the meaning is bound differently based upon the specific
/// - word 0 is a pointer to the state that the swapper IRQ context can modify (shared with the main loop) /// opcode. Not all arguments are used in all cases, unused argument values have no valid meaning (but in
/// - word 1 encodes the opcode /// practice typically contain the previous call's value, or 0).
/// - remaining words have a function depending on the opcode fn swap_handler(
/// `target` is a pointer to the physical page of memory that's being swapped _a0: usize,
fn swap_handler(arg: usize, target: *mut usize) { todo!() } _a1: usize,
_a2: usize,
_a3: usize,
_a4: usize,
_a5: usize,
_a6: usize,
_a7: usize,
) {
todo!()
}
fn main() { fn main() {
// init the log, but this is mostly unused. // init the log, but this is mostly unused.