git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@110 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2007-11-23 22:14:30 +00:00
parent 0f22fb555e
commit 320ea5a58a
1 changed files with 4 additions and 4 deletions

View File

@ -195,7 +195,7 @@ void chThdExit(t_msg msg) {
chSysLock();
currp->p_exitcode = msg; /* Post mortem info. */
currp->p_exitcode = msg;
#ifdef CH_USE_WAITEXIT
while (notempty(&currp->p_waiting))
chSchReadyI(list_remove(&currp->p_waiting), RDY_OK);
@ -204,8 +204,6 @@ void chThdExit(t_msg msg) {
chEvtSendI(&currp->p_exitesource);
#endif
chSchGoSleepS(PREXIT);
chSysUnlock(); /* Never executed. */
}
#ifdef CH_USE_WAITEXIT
@ -218,6 +216,7 @@ void chThdExit(t_msg msg) {
* option is enabled in \p chconf.h.
*/
t_msg chThdWait(Thread *tp) {
t_msg msg;
chSysLock();
@ -225,9 +224,10 @@ t_msg chThdWait(Thread *tp) {
list_insert(currp, &tp->p_waiting);
chSchGoSleepS(PRWAIT);
}
msg = tp->p_exitcode;
chSysUnlock();
return tp->p_exitcode;
return msg;
}
#endif /* CH_USE_WAITEXIT */