about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-03 15:12:18 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-03 23:48:12 -0800
commit8d881967a2be96a38df3b4d70337568c3f3562b7 (patch)
tree38443fe65cb51f7bcace94aa8169aead501a9ff0 /src/rt/rust_builtin.cpp
parentf94339cc1c98a1ae3ee3beb94c848009167a58d9 (diff)
downloadrust-8d881967a2be96a38df3b4d70337568c3f3562b7.tar.gz
rust-8d881967a2be96a38df3b4d70337568c3f3562b7.zip
rt: Extract rust_scheduler from rust_task_thread
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index bccd55f4288..8ac85c4ece7 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -4,6 +4,7 @@
 #include "rust_task_thread.h"
 #include "rust_task.h"
 #include "rust_util.h"
+#include "rust_scheduler.h"
 #include "sync/timer.h"
 
 #if !defined(__WIN32__)
@@ -416,7 +417,7 @@ start_task(rust_task_id id, fn_env_pair *f) {
 extern "C" CDECL int
 sched_threads() {
     rust_task *task = rust_task_thread::get_task();
-    return task->kernel->num_threads;
+    return task->thread->sched->number_of_threads();
 }
 
 extern "C" CDECL rust_port*