diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-29 13:09:57 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-29 13:09:57 +0900 |
commit | 48ccb4458d9c0f9accc1529fa94d089559aeca59 (patch) | |
tree | 065540ab51ecea71114ff1bbf2da7acef8c02a50 | |
parent | 866461d13ed16354867e0cec1dd4c288ae559c99 (diff) |
check RET in _join
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | chopstx.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -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. @@ -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"); } |