static void thread_start(void *param) { StartCall *call = (StartCall *)param; // Copy over the values so we can free `call` before making the call. // Otherwise, if the thread exits without returning, we have a leak. void *(*start_fn)(void *) = call->start_fn; void *arg = call->arg; free(call); start_fn(arg); }
static fn_decl(stream, name, decl, block, frame_sz) { auto ret = new_label(); start_fn(decl); prolog(stream, name, frame_sz); do_block(stream, block, -1, -1, ret); emit_label( stream, ret ); epilog(stream, frame_sz); end_fn(); }