diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-03-02 00:31:14 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-03-05 19:39:56 -0800 |
| commit | 77295c56c5b7edec061cbcd374ef584171088cbc (patch) | |
| tree | ddd2291f926bfcd52e08fe1304cf4f19ad4ce062 /src/rt/rust_builtin.cpp | |
| parent | 8e0efce0dad2a63fd290918df38a1d7626e6d4b3 (diff) | |
| download | rust-77295c56c5b7edec061cbcd374ef584171088cbc.tar.gz rust-77295c56c5b7edec061cbcd374ef584171088cbc.zip | |
rt: Simplify the recv interface
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 17c958633d1..d37245c29a4 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -543,10 +543,8 @@ rust_task_yield(rust_task *task, bool *killed) { } extern "C" CDECL void -port_recv(uintptr_t *dptr, rust_port *port, - uintptr_t *yield, uintptr_t *killed) { +port_recv(uintptr_t *dptr, rust_port *port, uintptr_t *yield) { *yield = false; - *killed = false; rust_task *task = rust_task_thread::get_task(); { scoped_lock with(port->lock); @@ -559,13 +557,6 @@ port_recv(uintptr_t *dptr, rust_port *port, return; } - // If this task has been killed then we're not going to bother - // blocking, we have to unwind. - if (task->must_fail_from_being_killed()) { - *killed = true; - return; - } - // No data was buffered on any incoming channel, so block this task on // the port. Remember the rendezvous location so that any sender task // can write to it before waking up this task. |
