Untangled some conditions.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14534 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
eb4b93f6cb
commit
24ea4a3706
|
@ -526,18 +526,17 @@ void chThdExitS(msg_t msg) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CH_CFG_USE_REGISTRY == TRUE
|
#if CH_CFG_USE_REGISTRY == TRUE
|
||||||
/* Static threads with no references are immediately removed from the
|
|
||||||
registry because there is no memory to recover.*/
|
|
||||||
#if CH_CFG_USE_DYNAMIC == TRUE
|
|
||||||
if (unlikely((currtp->refs == (trefs_t)0) &&
|
|
||||||
((currtp->flags & CH_FLAG_MODE_MASK) == CH_FLAG_MODE_STATIC))) {
|
|
||||||
REG_REMOVE(currtp);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (unlikely(currtp->refs == (trefs_t)0)) {
|
if (unlikely(currtp->refs == (trefs_t)0)) {
|
||||||
|
#if CH_CFG_USE_DYNAMIC == TRUE
|
||||||
|
/* Static threads are immediately removed from the registry because there
|
||||||
|
is no memory to recover.*/
|
||||||
|
if (unlikely(((currtp->flags & CH_FLAG_MODE_MASK) == CH_FLAG_MODE_STATIC))) {
|
||||||
|
REG_REMOVE(currtp);
|
||||||
|
}
|
||||||
|
#else
|
||||||
REG_REMOVE(currtp);
|
REG_REMOVE(currtp);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Going into final state.*/
|
/* Going into final state.*/
|
||||||
|
|
Loading…
Reference in New Issue