Spawn new tasks onto the primary scheduler by default. #3760

This commit is contained in:
Brian Anderson
2013-01-08 19:46:12 -08:00
parent 989667e545
commit 090b247056
6 changed files with 147 additions and 91 deletions

View File

@@ -652,7 +652,10 @@ new_task_common(rust_scheduler *sched, rust_task *parent) {
extern "C" CDECL rust_task*
new_task() {
rust_task *task = rust_get_current_task();
return new_task_common(task->sched, task);
rust_sched_id sched_id = task->kernel->main_sched_id();
rust_scheduler *sched = task->kernel->get_scheduler_by_id(sched_id);
assert(sched != NULL && "should always have a main scheduler");
return new_task_common(sched, task);
}
extern "C" CDECL rust_task*