static void cpu_lwp_trampoline(void (*func)(void *), void *arg) { lwp_startup(curcpu()->ci_stash, curlwp); func(arg); }
static void cpu_lwp_trampoline(ucontext_t *ucp, void (*func)(void *), void *arg) { #ifdef CPU_DEBUG thunk_printf_debug("cpu_lwp_trampoline called with func %p, arg %p\n", (void *) func, arg); #endif /* init lwp */ lwp_startup(curcpu()->ci_stash, curlwp); /* actual jump */ thunk_makecontext(ucp, (void (*)(void)) func, 1, arg, NULL, NULL, NULL); thunk_setcontext(ucp); }