Skip to content

Commit e7095f6

Browse files
thread: update p_local in a busy-yield loop
ABTI_thread_join() misses an update of p_locla in a busy-yield loop. This patch fixes it.
1 parent 62cf0e0 commit e7095f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/thread.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,7 @@ static inline int ABTI_thread_join(ABTI_local **pp_local, ABTI_thread *p_thread)
23542354
while (ABTD_atomic_load_uint32((uint32_t *)&p_thread->state)
23552355
!= ABT_THREAD_STATE_TERMINATED) {
23562356
ABTI_thread_yield(pp_local, p_local->p_thread);
2357+
p_local = *pp_local;
23572358
}
23582359
goto fn_exit;
23592360

0 commit comments

Comments
 (0)