From 218dd084697ed2ce58812ef9e69cdc86cb83bcf2 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 30 Mar 2012 13:54:37 -0700 Subject: 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. --- src/rt/rust_kernel.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/rt/rust_kernel.h') 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 #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 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); -- cgit 1.4.1-3-g733a5