feat: implement context switching, SavedContext with pc/status fields, wire all syscall outcomes and timer preemption
This commit is contained in:
@@ -28,9 +28,9 @@ fn spawn_thread_preserves_entry_and_stack() {
|
||||
SyscallOutcome::Complete(SyscallResult::Value(v)) => ThreadId::from_raw(v as u16),
|
||||
_ => panic!("expected Value"),
|
||||
};
|
||||
let ctx = k.thread_context(tid);
|
||||
let ctx = k.thread_context(tid).unwrap();
|
||||
assert_eq!(ctx.program_counter(), 0xDEAD);
|
||||
assert_eq!(ctx.stack_pointer(), 0xBEEF);
|
||||
assert_eq!(ctx.registers()[2], 0xBEEF);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user