Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
kernel
Commits
cc6f792a
Verified
Commit
cc6f792a
authored
Mar 19, 2021
by
4lDO2
🖖
Browse files
Use options(noreturn) in all naked functions.
parent
dc5f1fe0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/context/arch/x86_64.rs
View file @
cc6f792a
...
...
@@ -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
),
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment