rt: Checking port_table.is_empty() requires a lock
This commit is contained in:
parent
04d9cc18a5
commit
ed7d25bb6d
1 changed files with 6 additions and 1 deletions
|
@ -108,7 +108,12 @@ void
|
||||||
rust_task::delete_this()
|
rust_task::delete_this()
|
||||||
{
|
{
|
||||||
I(thread, !thread->lock.lock_held_by_current_thread());
|
I(thread, !thread->lock.lock_held_by_current_thread());
|
||||||
|
|
||||||
|
{
|
||||||
|
scoped_lock with (lock);
|
||||||
I(thread, port_table.is_empty());
|
I(thread, port_table.is_empty());
|
||||||
|
}
|
||||||
|
|
||||||
DLOG(thread, task, "~rust_task %s @0x%" PRIxPTR ", refcnt=%d",
|
DLOG(thread, task, "~rust_task %s @0x%" PRIxPTR ", refcnt=%d",
|
||||||
name, (uintptr_t)this, ref_count);
|
name, (uintptr_t)this, ref_count);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue