forked from M-Labs/libfringe
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:
parent
b986931817
commit
3397e0bcf1
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue