about summary refs log tree commit diff
path: root/src/rt/rust_kernel.h
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-03-30 13:54:37 -0700
committerBrian Anderson <banderson@mozilla.com>2012-03-31 19:51:29 -0700
commit218dd084697ed2ce58812ef9e69cdc86cb83bcf2 (patch)
tree171eaf77a6e1d8c4af168bcb17d2ba02d9f41f83 /src/rt/rust_kernel.h
parent771c1be6a64225d416ad99a860f1c8d34ce3a18b (diff)
downloadrust-218dd084697ed2ce58812ef9e69cdc86cb83bcf2.tar.gz
rust-218dd084697ed2ce58812ef9e69cdc86cb83bcf2.zip
rt: Introduce rust_sched_reaper
This just moves the responsibility for joining with scheduler threads
off to a worker thread. This will be needed when we allow tasks to be
scheduled on the main thread.
Diffstat (limited to 'src/rt/rust_kernel.h')
-rw-r--r--src/rt/rust_kernel.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rt/rust_kernel.h b/src/rt/rust_kernel.h
index f97303cae0f..78548917ee5 100644
--- a/src/rt/rust_kernel.h
+++ b/src/rt/rust_kernel.h
@@ -6,6 +6,7 @@
 #include <vector>
 #include "memory_region.h"
 #include "rust_log.h"
+#include "rust_sched_reaper.h"
 
 struct rust_task_thread;
 class rust_scheduler;
@@ -46,6 +47,8 @@ private:
     // A list of scheduler ids that are ready to exit
     std::vector<rust_sched_id> join_list;
 
+    rust_sched_reaper sched_reaper;
+
 public:
 
     struct rust_env *env;
@@ -66,7 +69,8 @@ public:
     rust_scheduler* get_scheduler_by_id(rust_sched_id id);
     // Called by a scheduler to indicate that it is terminating
     void release_scheduler_id(rust_sched_id id);
-    int wait_for_schedulers();
+    void wait_for_schedulers();
+    int wait_for_exit();
 
 #ifdef __WIN32__
     void win32_require(LPCTSTR fn, BOOL ok);