From 4ff8e15128f90d4e9e57897c48280c6f82bb8343 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Wed, 28 Jul 2010 16:24:50 -0700 Subject: Move notification-messages out into their own file and unify into notify_message, make them use proxies, cache task proxies in dom. --- src/rt/rust_task.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/rt/rust_task.cpp') diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 189824ac16a..b3caac252b9 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -385,6 +385,24 @@ rust_task::notify_waiting_tasks() } } +void +rust_task::notify_tasks_waiting_to_join() { + while (tasks_waiting_to_join.is_empty() == false) { + log(rust_log::ALL, "notify_tasks_waiting_to_join: %d", + tasks_waiting_to_join.size()); + maybe_proxy *waiting_task = tasks_waiting_to_join.pop(); + if (waiting_task->is_proxy()) { + notify_message::send(notify_message::WAKEUP, "wakeup", + this, waiting_task->as_proxy()); + } else { + rust_task *task = waiting_task->delegate(); + if (task->dead() == false) { + task->wakeup(this); + } + } + } +} + uintptr_t rust_task::get_fp() { // sp in any suspended task points to the last callee-saved reg on -- cgit 1.4.1-3-g733a5