Skip to content

Commit deec51f

Browse files
Merge pull request #128 from shintaro-iwasaki/FixImproperTLS
local: fix improper TLS handling
2 parents 549bac0 + e7095f6 commit deec51f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ int ABTI_xstream_join(ABTI_local **pp_local, ABTI_xstream *p_xstream)
12851285
* mode, the ULT can be blocked. Otherwise, the access mode, if it is a
12861286
* single-writer access mode, may be violated because another ES has to set
12871287
* the blocked ULT ready. */
1288-
p_local = ABTI_local_get_local();
1288+
p_local = *pp_local;
12891289
p_thread = p_local ? p_local->p_thread : NULL;
12901290
if (p_thread) {
12911291
ABT_pool_access access = p_thread->p_pool->access;

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)