Commit e84ca44b authored by Stefan Lankes's avatar Stefan Lankes
Browse files

avoiding compiler problems when building a kernel with debug symbols

parent aad17276
......@@ -34,7 +34,7 @@ memcpy = true
# The development profile, used for `cargo build`.
[profile.dev]
opt-level = 0 # controls the `--opt-level` the compiler builds with
opt-level = 1 # controls the `--opt-level` the compiler builds with
debug = true # controls whether the compiler passes `-C debuginfo`
# a value of `true` is equivalent to `2`
rpath = false # controls whether the compiler passes `-C rpath`
......
......@@ -24,7 +24,7 @@
#[inline(never)]
#[naked]
pub extern "C" fn switch(old_stack: *mut usize, new_stack: usize) {
pub extern "C" fn switch(_old_stack: *mut usize, _new_stack: usize) {
// rdi = old_stack => the address to store the old rsp
// rsi = new_stack => stack pointer of the new task
......@@ -77,7 +77,7 @@ pub extern "C" fn switch(old_stack: *mut usize, new_stack: usize) {
pop %rdx\n\t\
pop %rcx\n\t\
pop %rax\n\t\
popfq" :: "r{rdi}"(old_stack as u64), "r{rsi}"(new_stack as u64):: "volatile"
popfq" :::: "volatile"
);
}
}
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