From daece1a8d34773391503bc6356b4dd43f45f2d63 Mon Sep 17 00:00:00 2001 From: edef Date: Sun, 3 Apr 2016 19:56:15 +0200 Subject: [PATCH] Registers::{swap2 => swap}, to match Context::swap --- src/arch/x86/mod.rs | 2 +- src/arch/x86_64/mod.rs | 2 +- src/context.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/x86/mod.rs b/src/arch/x86/mod.rs index 32b2ccc..2366c6d 100644 --- a/src/arch/x86/mod.rs +++ b/src/arch/x86/mod.rs @@ -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") diff --git a/src/arch/x86_64/mod.rs b/src/arch/x86_64/mod.rs index fefa6cd..ff2ef03 100644 --- a/src/arch/x86_64/mod.rs +++ b/src/arch/x86_64/mod.rs @@ -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") diff --git a/src/context.rs b/src/context.rs index 188f0dd..36e411f 100644 --- a/src/context.rs +++ b/src/context.rs @@ -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) } }