Fix stack size returned by uxTaskGetSystemState()

This code used to work, but as part of the toolchain update it looks
like there must have been a compiler change affecting the relative
precedence of '|=' and '-'.  Add parentheses to make the order
explicit.
This commit is contained in:
Stephen Casner 2018-02-23 23:58:52 -08:00
parent 4c532a59b2
commit 7f6161cd25

View file

@ -3759,7 +3759,7 @@ BaseType_t xTaskGetAffinity( TaskHandle_t xTask )
} poison_head_t;
poison_head_t* stackblk = (poison_head_t*)(pxNextTCB->pxStack - sizeof(poison_head_t));
uint32_t stackinfo = stackblk->alloc_size << 16;
stackinfo |= pxNextTCB->pxTopOfStack - pxNextTCB->pxStack;
stackinfo |= (pxNextTCB->pxTopOfStack - pxNextTCB->pxStack);
pxTaskStatusArray[ uxTask ].pxStackBase = (StackType_t*)stackinfo;
#endif