From de611a309006f0976bc9a579eb1087e7a89f79a7 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Tue, 7 Sep 2010 18:39:07 -0700 Subject: Lots of design changes around proxies and message passing. Made it so that domains can only talk to other domains via handles, and with the help of the rust_kernel. --- src/rt/rust_task.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/rt/rust_task.cpp') diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 08d5974ecbb..408996f69db 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -404,9 +404,10 @@ rust_task::notify_tasks_waiting_to_join() { tasks_waiting_to_join.pop(&waiting_task); if (waiting_task->is_proxy()) { notify_message::send(notify_message::WAKEUP, "wakeup", - this, waiting_task->as_proxy()); + get_handle(), waiting_task->as_proxy()->handle()); + delete waiting_task; } else { - rust_task *task = waiting_task->delegate(); + rust_task *task = waiting_task->referent(); if (task->dead() == false) { task->wakeup(this); } @@ -563,8 +564,7 @@ rust_task::transition(ptr_vec *src, ptr_vec *dst) } void -rust_task::block(rust_cond *on, const char* name) -{ +rust_task::block(rust_cond *on, const char* name) { log(rust_log::TASK, "Blocking on 0x%" PRIxPTR ", cond: 0x%" PRIxPTR, (uintptr_t) on, (uintptr_t) cond); A(dom, cond == NULL, "Cannot block an already blocked task."); @@ -631,6 +631,11 @@ rust_task::log(uint32_t type_bits, char const *fmt, ...) { } } +rust_handle * +rust_task::get_handle() { + return dom->kernel->get_task_handle(this); +} + // // Local Variables: // mode: C++ -- cgit 1.4.1-3-g733a5