Making more of the rust_task structure directly accessible from Rust.

This commit is contained in:
Eric Holk
2011-08-17 14:42:28 -07:00
parent efac7c9a19
commit ae89ea223d
10 changed files with 51 additions and 54 deletions

View File

@@ -47,10 +47,10 @@ void
rust_scheduler::activate(rust_task *task) {
context ctx;
task->ctx.next = &ctx;
task->user.ctx.next = &ctx;
DLOG(this, task, "descheduling...");
lock.unlock();
task->ctx.swap(ctx);
task->user.ctx.swap(ctx);
lock.lock();
DLOG(this, task, "task has returned");
}
@@ -226,7 +226,7 @@ rust_scheduler::start_main_loop() {
", state: %s",
scheduled_task->name,
(uintptr_t)scheduled_task,
scheduled_task->rust_sp,
scheduled_task->user.rust_sp,
scheduled_task->state->name);
interrupt_flag = 0;
@@ -244,7 +244,7 @@ rust_scheduler::start_main_loop() {
scheduled_task->name,
(uintptr_t)scheduled_task,
scheduled_task->state->name,
scheduled_task->rust_sp,
scheduled_task->user.rust_sp,
id);
reap_dead_tasks(id);