Rewrite spawn yet again
The motivation here is that the bottom of each stack needs to contain a C++ try/catch block so that we can unwind. This is already the case for main, but not spawned tasks. Issue #236
This commit is contained in:
@@ -48,10 +48,10 @@ void
|
||||
rust_scheduler::activate(rust_task *task) {
|
||||
context ctx;
|
||||
|
||||
task->user.ctx.next = &ctx;
|
||||
task->ctx.next = &ctx;
|
||||
DLOG(this, task, "descheduling...");
|
||||
lock.unlock();
|
||||
task->user.ctx.swap(ctx);
|
||||
task->ctx.swap(ctx);
|
||||
lock.lock();
|
||||
DLOG(this, task, "task has returned");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user