From 4220dcf1e9de2c2d2c329ecefa80108b63a69145 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sat, 18 Feb 2012 16:34:42 -0800 Subject: core: New task API --- src/rt/rust_builtin.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/rt/rust_builtin.cpp') diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 6c0cd5e5fc0..29940492f79 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -539,6 +539,11 @@ chan_id_send(type_desc *t, rust_task_id target_task_id, // FIXME: make sure this is thread-safe bool sent = false; rust_task *task = rust_task_thread::get_task(); + + LOG(task, comm, "chan_id_send task: 0x%" PRIxPTR + " port: 0x%" PRIxPTR, (uintptr_t) target_task_id, + (uintptr_t) target_port_id); + rust_task *target_task = task->kernel->get_task_by_id(target_task_id); if(target_task) { rust_port *port = target_task->get_port_by_id(target_port_id); @@ -547,8 +552,12 @@ chan_id_send(type_desc *t, rust_task_id target_task_id, scoped_lock with(target_task->lock); port->deref(); sent = true; + } else { + LOG(task, comm, "didn't get the port"); } target_task->deref(); + } else { + LOG(task, comm, "didn't get the task"); } return (uintptr_t)sent; } -- cgit 1.4.1-3-g733a5