(arg0: *mut u8, top_of_stack: *mut u8)
| 223 | } |
| 224 | |
| 225 | extern "C" fn fiber_start<F, A, B, C>(arg0: *mut u8, top_of_stack: *mut u8) -> *mut u8 |
| 226 | where |
| 227 | F: FnOnce(A, &mut super::Suspend<A, B, C>) -> C, |
| 228 | { |
| 229 | unsafe { |
| 230 | // Complete the `start_switch` AddressSanitizer handshake which would |
| 231 | // have been started in `Fiber::resume`. |
| 232 | let previous = asan::fiber_start_complete(); |
| 233 | |
| 234 | let inner = Suspend { |
| 235 | top_of_stack, |
| 236 | previous, |
| 237 | }; |
| 238 | let initial = inner.take_resume::<A, B, C>(); |
| 239 | let mut inner = |
| 240 | super::Suspend::<A, B, C>::execute(inner, initial, Box::from_raw(arg0.cast::<F>())); |
| 241 | asan::fiber_exit(&mut inner.previous); |
| 242 | inner.top_of_stack |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | impl Fiber { |
| 247 | pub fn new<F, A, B, C>(stack: &FiberStack, func: F) -> Result<Self> |
nothing calls this directly
no test coverage detected