diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-04-07 22:05:45 +0200 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-04-07 15:15:30 -0700 |
| commit | 9a7576fe2cdd169313b5e25be6bf485407adb496 (patch) | |
| tree | 36f5c9a5baaae95be1fb3cdc9b5b76814b08e803 /src/rt/rust_chan.cpp | |
| parent | 6dcf6218b1e0e70e60afe8d1a9f336adad060362 (diff) | |
| download | rust-9a7576fe2cdd169313b5e25be6bf485407adb496.tar.gz rust-9a7576fe2cdd169313b5e25be6bf485407adb496.zip | |
Move to macro-based logging checks in the C++ code
No functions should be called for log statements that turn out to be inactive.
Diffstat (limited to 'src/rt/rust_chan.cpp')
| -rw-r--r-- | src/rt/rust_chan.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rt/rust_chan.cpp b/src/rt/rust_chan.cpp index 9a6664535cf..a88579607c4 100644 --- a/src/rt/rust_chan.cpp +++ b/src/rt/rust_chan.cpp @@ -13,14 +13,14 @@ rust_chan::rust_chan(rust_task *task, if (port) { associate(port); } - task->log(rust_log::MEM | rust_log::COMM, + LOG(task, rust_log::MEM | rust_log::COMM, "new rust_chan(task=0x%" PRIxPTR ", port=0x%" PRIxPTR ") -> chan=0x%" PRIxPTR, (uintptr_t) task, (uintptr_t) port, (uintptr_t) this); } rust_chan::~rust_chan() { - task->log(rust_log::MEM | rust_log::COMM, + LOG(task, rust_log::MEM | rust_log::COMM, "del rust_chan(task=0x%" PRIxPTR ")", (uintptr_t) this); A(task->dom, is_associated() == false, @@ -33,7 +33,7 @@ rust_chan::~rust_chan() { void rust_chan::associate(maybe_proxy<rust_port> *port) { this->port = port; if (port->is_proxy() == false) { - task->log(rust_log::TASK, + LOG(task, rust_log::TASK, "associating chan: 0x%" PRIxPTR " with port: 0x%" PRIxPTR, this, port); this->port->referent()->chans.push(this); @@ -51,7 +51,7 @@ void rust_chan::disassociate() { A(task->dom, is_associated(), "Channel must be associated with a port."); if (port->is_proxy() == false) { - task->log(rust_log::TASK, + LOG(task, rust_log::TASK, "disassociating chan: 0x%" PRIxPTR " from port: 0x%" PRIxPTR, this, port->referent()); port->referent()->chans.swap_delete(this); @@ -84,7 +84,7 @@ void rust_chan::send(void *sptr) { } else { rust_port *target_port = port->referent(); if (target_port->task->blocked_on(target_port)) { - dom->log(rust_log::COMM, "dequeued in rendezvous_ptr"); + DLOG(dom, rust_log::COMM, "dequeued in rendezvous_ptr"); buffer.dequeue(target_port->task->rendezvous_ptr); target_port->task->rendezvous_ptr = 0; target_port->task->wakeup(target_port); |
