#![cfg_attr(feature = "std", allow(dead_code, unreachable_code))]
use core::cell::UnsafeCell;
extern "C" {
static STACK_POINTER: UnsafeCell<usize>;
}
pub unsafe fn stack_pointer_init() {
#[cfg(feature = "std")]
return unimplemented!();
#[cfg(not(feature = "std"))]
unsafe {
asm!("mv sp, {}", in(reg) STACK_POINTER.get() as usize);
}
}
#[inline]
pub fn wait_for_int() {
#[cfg(feature = "std")]
return unimplemented!();
#[cfg(not(feature = "std"))]
unsafe {
asm!("wfi", options(nomem, nostack, preserves_flags));
}
}