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-04-03 14:03:27 -0700
committerBrian Anderson <banderson@mozilla.com>2012-04-03 14:28:30 -0700
commitbef72447e75b7e37f43d3a82ce40e419c7f747d2 (patch)
tree92e5355f9320194ca9cb512b1079f73ca89de2c7 /src/rt/rust_builtin.cpp
parente1858882a49bf0666d4ffb3f45989ac9dbe9c843 (diff)
downloadrust-bef72447e75b7e37f43d3a82ce40e419c7f747d2.tar.gz
rust-bef72447e75b7e37f43d3a82ce40e419c7f747d2.zip
core: Add a scheduler mode, osmain, to spawn onto the main scheduler
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index aa1f1ce1e6a..f13fd4a110b 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -646,6 +646,12 @@ rust_dbg_call(dbg_callback cb, void *data) {
     return cb(data);
 }
 
+extern "C" CDECL rust_sched_id
+rust_osmain_sched_id() {
+    rust_task *task = rust_sched_loop::get_task();
+    return task->kernel->osmain_sched_id();
+}
+
 //
 // Local Variables:
 // mode: C++