diff --git a/ChangeLog b/ChangeLog index 903a8c0..5a0dab4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ (chx_sched): Add an argument for race avoidance. (chopstx_intr_wait): Fix the race condition. (chopstx_cond_broadcast): Fix initial value. + (chopstx_join): Check RET. * board/board-olimex-stm32-h103.h (NEUG_ADC_SETTING2_*): Add. diff --git a/chopstx.c b/chopstx.c index 5064866..6a81638 100644 --- a/chopstx.c +++ b/chopstx.c @@ -1131,7 +1131,8 @@ chopstx_join (chopstx_t thd, void **ret) } tp->state = THREAD_FINISHED; - *ret = (void *)tp->tc.reg[0]; + if (ret) + *ret = (void *)tp->tc.reg[0]; asm volatile ("cpsie i" : : : "memory"); }