diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-09-27 19:19:19 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-09-28 10:22:02 -0700 |
| commit | e8757ea01f39826911a4c05ddf4b7e6990a56f27 (patch) | |
| tree | 79e0810cce8a4c436546ef46be9f50a1d4e9e541 /src/rt/rust_scheduler.cpp | |
| parent | dbf472b0df9426da1610e328a3e505fe4dc9de11 (diff) | |
| download | rust-e8757ea01f39826911a4c05ddf4b7e6990a56f27.tar.gz rust-e8757ea01f39826911a4c05ddf4b7e6990a56f27.zip | |
rt: Expose the C stack inside the Rust scheduler so that C calls can switch to it
Diffstat (limited to 'src/rt/rust_scheduler.cpp')
| -rw-r--r-- | src/rt/rust_scheduler.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp index 8c898e2ac85..cf3b03ee60d 100644 --- a/src/rt/rust_scheduler.cpp +++ b/src/rt/rust_scheduler.cpp @@ -58,12 +58,10 @@ rust_scheduler::~rust_scheduler() { void rust_scheduler::activate(rust_task *task) { - context ctx; - - task->ctx.next = &ctx; + task->ctx.next = &c_context; DLOG(this, task, "descheduling..."); lock.unlock(); - task->ctx.swap(ctx); + task->ctx.swap(c_context); lock.lock(); DLOG(this, task, "task has returned"); } |
