diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-08-13 15:20:11 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-08-15 09:26:52 -0700 |
| commit | be7325073acb63ed76861de387c6035d714c26db (patch) | |
| tree | 551adfe941a9d543958e764b45b6aca1fc94bdc1 /src/rt/rust_task.cpp | |
| parent | c3535f58427aed5aed891f302de728b0b809838c (diff) | |
| download | rust-be7325073acb63ed76861de387c6035d714c26db.tar.gz rust-be7325073acb63ed76861de387c6035d714c26db.zip | |
Removed spawn and task from the parser. Updated all the tests except for the benchmarks.
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 1a28e6fb947..148996f0008 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -107,12 +107,19 @@ struct spawn_args { uintptr_t, uintptr_t); }; +struct rust_closure { + intptr_t ref_count; + type_desc *td; +}; + extern "C" CDECL -void task_exit(intptr_t *env, int rval, rust_task *task) { +void task_exit(rust_closure *env, int rval, rust_task *task) { LOG(task, task, "task exited with value %d", rval); if(env) { // free the environment. - I(task->sched, 1 == *env); // the ref count better be 1 + I(task->sched, 1 == env->ref_count); // the ref count better be 1 + //env->td->drop_glue(NULL, task, NULL, env->td->first_param, env); + //env->td->free_glue(NULL, task, NULL, env->td->first_param, env); task->free(env); } task->die(); |
