@@ -272,13 +272,13 @@ mbed_error_status_t mbed_clear_all_errors(void)
272
272
273
273
#if MBED_CONF_PLATFORM_ERROR_ALL_THREADS_INFO && defined(MBED_CONF_RTOS_PRESENT )
274
274
/* Prints info of a thread(using osRtxThread_t struct)*/
275
- static void print_thread (osRtxThread_t * thread )
275
+ static void print_thread (const osRtxThread_t * thread )
276
276
{
277
277
mbed_error_printf ("\nState: 0x%08X Entry: 0x%08X Stack Size: 0x%08X Mem: 0x%08X SP: 0x%08X" , thread -> state , thread -> thread_addr , thread -> stack_size , (uint32_t )thread -> stack_mem , thread -> sp );
278
278
}
279
279
280
280
/* Prints thread info from a list */
281
- static void print_threads_info (osRtxThread_t * threads )
281
+ static void print_threads_info (const osRtxThread_t * threads )
282
282
{
283
283
while (threads != NULL ) {
284
284
print_thread (threads );
@@ -355,17 +355,14 @@ static void print_error_report(mbed_error_ctx *ctx, const char *error_msg)
355
355
mbed_error_printf ("\nNext:" );
356
356
print_thread (osRtxInfo .thread .run .next );
357
357
358
+ mbed_error_printf ("\nReady:" );
359
+ print_threads_info (osRtxInfo .thread .ready .thread_list );
360
+
358
361
mbed_error_printf ("\nWait:" );
359
- osRtxThread_t * threads = (osRtxThread_t * )& osRtxInfo .thread .wait_list ;
360
- print_threads_info (threads );
362
+ print_threads_info (osRtxInfo .thread .wait_list );
361
363
362
364
mbed_error_printf ("\nDelay:" );
363
- threads = (osRtxThread_t * )& osRtxInfo .thread .delay_list ;
364
- print_threads_info (threads );
365
-
366
- mbed_error_printf ("\nIdle:" );
367
- threads = (osRtxThread_t * )& osRtxInfo .thread .idle ;
368
- print_threads_info (threads );
365
+ print_threads_info (osRtxInfo .thread .delay_list );
369
366
#endif
370
367
mbed_error_printf (MBED_CONF_PLATFORM_ERROR_DECODE_HTTP_URL_STR , ctx -> error_status );
371
368
mbed_error_printf ("\n-- MbedOS Error Info --\n" );
0 commit comments