Trait drone_cortexm::sv::Switch[][src]

pub trait Switch<T> where
    Self: SvCall<SwitchContextService>,
    Self: SvCall<SwitchBackService>, 
{ unsafe fn switch_context(data: *mut T, stack_ptr: *mut *const u8);
unsafe fn switch_back(data: *mut *mut T); }

Extends Supervisor types with switch_context and switch_back methods.

Required methods

unsafe fn switch_context(data: *mut T, stack_ptr: *mut *const u8)[src]

Switches to the given process stack.

Safety

  • data must be word-aligned.
  • *stack_ptr must be word-aligned.

unsafe fn switch_back(data: *mut *mut T)[src]

Switches to the previous stack.

Safety

  • Must be called only from Process Stack.
  • T must match the previous switch_context.
  • *data must be word-aligned.
Loading content...

Implementors

impl<Sv, T> Switch<T> for Sv where
    Sv: SvCall<SwitchContextService>,
    Sv: SvCall<SwitchBackService>, 
[src]

Loading content...