File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ osStatus Thread::start(Callback<void()> task) {
105
105
106
106
// Fill the stack with a magic word for maximum usage checking
107
107
for (uint32_t i = 0 ; i < (_attr.stack_size / sizeof (uint32_t )); i++) {
108
- ((uint32_t *)_attr.stack_mem )[i] = 0xE25A2EA5 ;
108
+ ((uint32_t *)_attr.stack_mem )[i] = osRtxStackMagicWord ;
109
109
}
110
110
111
111
memset (&_obj_mem, 0 , sizeof (_obj_mem));
@@ -306,7 +306,7 @@ uint32_t Thread::max_stack() {
306
306
#if defined(MBED_OS_BACKEND_RTX5)
307
307
mbed_rtos_storage_thread_t *thread = (mbed_rtos_storage_thread_t *)_tid;
308
308
uint32_t high_mark = 0 ;
309
- while (((uint32_t *)(thread->stack_mem ))[high_mark] == 0xE25A2EA5 )
309
+ while (((( uint32_t *)(thread->stack_mem ))[high_mark] == osRtxStackMagicWord) || ((( uint32_t *)(thread-> stack_mem ))[high_mark] == osRtxStackFillPattern) )
310
310
high_mark++;
311
311
size = thread->stack_size - (high_mark * sizeof (uint32_t ));
312
312
#else
You can’t perform that action at this time.
0 commit comments