Remove spawn_wrap and main_wrap kludges
This isn't needed now that our functions are cdecl (and was apparently only still working by accident). Issue #992
This commit is contained in:
parent
243c5c3479
commit
e927df17f7
5 changed files with 10 additions and 41 deletions
|
@ -472,13 +472,18 @@ struct fn_env_pair {
|
|||
intptr_t env;
|
||||
};
|
||||
|
||||
extern "C" CDECL uintptr_t get_spawn_wrapper();
|
||||
// FIXME This is probably not needed at all anymore. Have to rearrange some
|
||||
// argument passing to remove it.
|
||||
void rust_spawn_wrapper(void* retptr, rust_task* taskptr, void* envptr,
|
||||
void(*func)(void*, rust_task*, void*)) {
|
||||
func(retptr, taskptr, envptr);
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
start_task(void *unused_task, rust_task_id id, fn_env_pair *f) {
|
||||
rust_task *task = rust_scheduler::get_task();
|
||||
rust_task *target = task->kernel->get_task_by_id(id);
|
||||
target->start(get_spawn_wrapper(), f->f, f->env);
|
||||
target->start((uintptr_t)rust_spawn_wrapper, f->f, f->env);
|
||||
target->deref();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue