Verified Commit cc6f792a authored by 4lDO2's avatar 4lDO2 🖖
Browse files

Use options(noreturn) in all naked functions.

parent dc5f1fe0
......@@ -216,12 +216,14 @@ pub unsafe extern "C" fn switch_to(_prev: &mut Context, _next: &mut Context) {
// the calling function, `context::switch`. Thus, we have to execute this Rust hook by
// ourselves, which will unlock the contexts before the later switch.
call {switch_hook}
// Note that switch_finish_hook will be responsible for executing `ret`.
jmp {switch_hook}
",
true = const(AbiCompatBool::True as u8),
switch_hook = sym crate::context::switch_finish_hook,
options(noreturn),
);
}
......@@ -275,8 +277,10 @@ unsafe extern fn signal_handler_wrapper() {
pop rcx
pop rax
add rsp, 16
ret
",
inner = sym inner,
options(noreturn),
);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment