forked from M-Labs/libfringe
Registers::{swap2 => swap}, to match Context::swap
This commit is contained in:
parent
976b971436
commit
daece1a8d3
|
@ -32,7 +32,7 @@ impl Registers {
|
|||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub unsafe fn swap2(out_regs: *mut Registers, in_regs: *const Registers) {
|
||||
pub unsafe fn swap(out_regs: *mut Registers, in_regs: *const Registers) {
|
||||
let out_espp = &mut (*out_regs).esp;
|
||||
let in_espp = &(*in_regs).esp;
|
||||
asm!(include_str!("swap.s")
|
||||
|
|
|
@ -31,7 +31,7 @@ impl Registers {
|
|||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub unsafe fn swap2(out_regs: *mut Registers, in_regs: *const Registers) {
|
||||
pub unsafe fn swap(out_regs: *mut Registers, in_regs: *const Registers) {
|
||||
let out_rspp = &mut (*out_regs).rsp;
|
||||
let in_rspp = &(*in_regs).rsp;
|
||||
asm!(include_str!("swap.s")
|
||||
|
|
|
@ -54,6 +54,6 @@ impl<'i, InStack> Context<'i, InStack> where InStack: stack::Stack {
|
|||
/// Switch to in_ctx, saving the current thread of execution to out_ctx.
|
||||
#[inline(always)]
|
||||
pub unsafe fn swap<'o, OutStack: stack::Stack>(out_ctx: *mut Context<'o, OutStack>, in_ctx: *const Context<'i, InStack>) {
|
||||
Registers::swap2(&mut (*out_ctx).regs, &(*in_ctx).regs)
|
||||
Registers::swap(&mut (*out_ctx).regs, &(*in_ctx).regs)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue