diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-02-18 16:34:42 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-02-20 18:58:04 -0800 |
| commit | 4220dcf1e9de2c2d2c329ecefa80108b63a69145 (patch) | |
| tree | bd70397f064225f8d38b692f5f8120ed9e732d9e /src/rt/rust_builtin.cpp | |
| parent | fbc95ba0184a417ff6d8b2b417f210c960e142cc (diff) | |
| download | rust-4220dcf1e9de2c2d2c329ecefa80108b63a69145.tar.gz rust-4220dcf1e9de2c2d2c329ecefa80108b63a69145.zip | |
core: New task API
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |
