Skip to content

Commit 06a10cc

Browse files
committed
---
yaml --- r: 5594 b: refs/heads/master c: e8757ea h: refs/heads/master v: v3
1 parent b3ee4aa commit 06a10cc

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: dbf472b0df9426da1610e328a3e505fe4dc9de11
2+
refs/heads/master: e8757ea01f39826911a4c05ddf4b7e6990a56f27

trunk/src/rt/rust_scheduler.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,10 @@ rust_scheduler::~rust_scheduler() {
5858

5959
void
6060
rust_scheduler::activate(rust_task *task) {
61-
context ctx;
62-
63-
task->ctx.next = &ctx;
61+
task->ctx.next = &c_context;
6462
DLOG(this, task, "descheduling...");
6563
lock.unlock();
66-
task->ctx.swap(ctx);
64+
task->ctx.swap(c_context);
6765
lock.lock();
6866
DLOG(this, task, "task has returned");
6967
}

trunk/src/rt/rust_scheduler.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef RUST_SCHEDULER_H
22
#define RUST_SCHEDULER_H
33

4+
#include "context.h"
5+
46
#ifndef _WIN32
57
#include <pthread.h>
68
#else
@@ -72,6 +74,7 @@ struct rust_scheduler : public kernel_owned<rust_scheduler>,
7274
static bool tls_initialized;
7375

7476
rust_env *env;
77+
context c_context;
7578

7679
// Only a pointer to 'name' is kept, so it must live as long as this
7780
// domain.

0 commit comments

Comments
 (0)