about summary refs log tree commit diff
path: root/src/rt/rust_scheduler.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-06 14:03:20 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-07 10:32:58 -0700
commit25ae3d655cef63041d405a45f4797d21f8904502 (patch)
tree6a6dc9c15050df636670e36709a1a3ed7f2a8759 /src/rt/rust_scheduler.cpp
parent1bd627039ed6979c59d25aee67548091522c6ff9 (diff)
downloadrust-25ae3d655cef63041d405a45f4797d21f8904502.tar.gz
rust-25ae3d655cef63041d405a45f4797d21f8904502.zip
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
Diffstat (limited to 'src/rt/rust_scheduler.cpp')
-rw-r--r--src/rt/rust_scheduler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp
index 859db885e82..3a69184d3fe 100644
--- a/src/rt/rust_scheduler.cpp
+++ b/src/rt/rust_scheduler.cpp
@@ -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");
 }