From d6815a5903716c058c4f8bee89bfa745ee752c9d Mon Sep 17 00:00:00 2001 From: Tianhao Wang Date: Wed, 5 Jun 2024 07:56:16 +0200 Subject: proc: interrupt: define context and trap frame Signed-off-by: Tianhao Wang --- src/arch/x86_64/context.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/arch/x86_64/context.rs (limited to 'src/arch/x86_64/context.rs') diff --git a/src/arch/x86_64/context.rs b/src/arch/x86_64/context.rs deleted file mode 100644 index 6c46271..0000000 --- a/src/arch/x86_64/context.rs +++ /dev/null @@ -1,28 +0,0 @@ -/// high level representation of the callee saved registers for thread context. The caller -/// saved registers will is pushed into the stack already upon the interrupt entry -/// fpstate is NOT saved here -#[repr(C)] -pub struct Context { - rbx: u64, - r12: u64, - r13: u64, - r14: u64, - r15: u64, - rbp: u64, - rsp: u64, -} - -/// prepare the thread (coroutine) for the first execution -pub unsafe fn settle() { - todo!() - // it will be something like this... - // void **sp = (void**)tos; - // *(--sp) = object; // 7th parameter for kickoff - // *(--sp) = (void*)0; // return address - // *(--sp) = kickoff; // address - // regs->rsp = sp; -} - -pub unsafe fn switch(_ctx_curr: usize, _ctx_next: usize) { - todo!() -} -- cgit v1.2.3-70-g09d2