1
0
Fork 0

at least allow different lifetimes in Context::swap2

Really we should allow swapping between different stack types easily, so
we can easily swap between contexts with different stack types.
This commit is contained in:
edef 2016-03-22 08:46:27 +01:00
parent b986931817
commit 3397e0bcf1
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ impl<'a, Stack> Context<'a, Stack> where Stack: stack::Stack {
/// Switch to in_ctx, saving the current thread of execution to out_ctx. /// Switch to in_ctx, saving the current thread of execution to out_ctx.
#[inline(always)] #[inline(always)]
pub unsafe fn swap2(out_ctx: *mut Context<'a, Stack>, in_ctx: *const Context<'a, Stack>) { pub unsafe fn swap2<'b>(out_ctx: *mut Context<'a, Stack>, in_ctx: *const Context<'b, Stack>) {
Registers::swap2(&mut (*out_ctx).regs, &(*in_ctx).regs) Registers::swap2(&mut (*out_ctx).regs, &(*in_ctx).regs)
} }