Function drone_cortexm::fib::new_proc_unchecked [−][src]
pub unsafe fn new_proc_unchecked<Sv, I, Y, R, F>(
stack_size: usize,
f: F
) -> FiberProc<Sv, I, Y, R, F> where
Sv: Switch<Data<I, FiberState<Y, R>>>,
F: FnMut(I, Yielder<Sv, I, Y, R>) -> R,
F: Send + 'static,
I: Send + 'static,
Y: Send + 'static,
R: Send + 'static,
Creates a stackful fiber from the closure f
, without memory protection.
The first argument to the closure is
Fiber::Input
.
This type of fiber yields on each proc_yield
call
on the second Yielder
argument.
Safety
Stack overflow is unchecked.
Panics
- If
stack_size
is insufficient to store the initial frame.