|
@@ -1311,7 +1311,7 @@ static void __machine__remove_thread(struct machine *machine, struct thread *th,
|
|
if (machine->last_match == th)
|
|
if (machine->last_match == th)
|
|
machine->last_match = NULL;
|
|
machine->last_match = NULL;
|
|
|
|
|
|
- BUG_ON(th->refcnt.counter == 0);
|
|
|
|
|
|
+ BUG_ON(atomic_read(&th->refcnt) == 0);
|
|
if (lock)
|
|
if (lock)
|
|
pthread_rwlock_wrlock(&machine->threads_lock);
|
|
pthread_rwlock_wrlock(&machine->threads_lock);
|
|
rb_erase(&th->rb_node, &machine->threads);
|
|
rb_erase(&th->rb_node, &machine->threads);
|