rt: Move some code from rust_port_detach into rust_port::detach
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user