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.

This commit is contained in:
Michael Bebenita
2010-09-07 18:39:07 -07:00
parent a6aebdaedd
commit de611a3090
23 changed files with 650 additions and 444 deletions

View File

@@ -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<rust_task> *src, ptr_vec<rust_task> *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> *
rust_task::get_handle() {
return dom->kernel->get_task_handle(this);
}
//
// Local Variables:
// mode: C++