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
|
||||
|
||||
#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 (unlikely(currtp->refs == (trefs_t)0)) {
|
||||
#if CH_CFG_USE_DYNAMIC == TRUE
|
||||
if (unlikely((currtp->refs == (trefs_t)0) &&
|
||||
((currtp->flags & CH_FLAG_MODE_MASK) == CH_FLAG_MODE_STATIC))) {
|
||||
/* 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
|
||||
if (unlikely(currtp->refs == (trefs_t)0)) {
|
||||
REG_REMOVE(currtp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Going into final state.*/
|
||||
|
|
Loading…
Reference in New Issue