Registers::{swap2 => swap}, to match Context::swap

This commit is contained in:
edef 2016-04-03 19:56:15 +02:00
parent 976b971436
commit daece1a8d3
3 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

@ -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")

View File

@ -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)
}
}