check RET in _join

This commit is contained in:
NIIBE Yutaka
2013-05-29 13:09:57 +09:00
parent 866461d13e
commit 48ccb4458d
2 changed files with 3 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
(chx_sched): Add an argument for race avoidance. (chx_sched): Add an argument for race avoidance.
(chopstx_intr_wait): Fix the race condition. (chopstx_intr_wait): Fix the race condition.
(chopstx_cond_broadcast): Fix initial value. (chopstx_cond_broadcast): Fix initial value.
(chopstx_join): Check RET.
* board/board-olimex-stm32-h103.h (NEUG_ADC_SETTING2_*): Add. * board/board-olimex-stm32-h103.h (NEUG_ADC_SETTING2_*): Add.

View File

@@ -1131,7 +1131,8 @@ chopstx_join (chopstx_t thd, void **ret)
} }
tp->state = THREAD_FINISHED; tp->state = THREAD_FINISHED;
*ret = (void *)tp->tc.reg[0]; if (ret)
*ret = (void *)tp->tc.reg[0];
asm volatile ("cpsie i" : : : "memory"); asm volatile ("cpsie i" : : : "memory");
} }