rt: Move some code from rust_port_detach into rust_port::detach

This commit is contained in:
Brian Anderson
2012-03-03 02:50:23 -08:00
parent 93fa933a19
commit 8e0efce0da
2 changed files with 6 additions and 6 deletions

View File

@@ -486,12 +486,6 @@ rust_port_detach(rust_port *port) {
rust_task *task = rust_task_thread::get_task();
LOG(task, comm, "rust_port_detach(0x%" PRIxPTR ")", (uintptr_t) port);
port->detach();
// FIXME: Busy waiting until we're the only ref
bool done = false;
while (!done) {
scoped_lock with(task->port_lock);
done = port->ref_count == 1;
}
}
extern "C" CDECL void