subsystem: kernel_shell: extend thread info

1) Dump time sinse last scheduler call
Could be handy for tickless kernel debug.
Will indicate that no rtc irq is called

2) Dump current timeout of each thread
Could be used to find yout when thread will wake up

3) Dump human friendly thread state

4) Use shell_prin instead shell_fprintf

Signed-off-by: Pavlo Hamov <pavlo_hamov@jabil.com>
This commit is contained in:
Pavlo Hamov 2019-07-31 12:43:54 +03:00 committed by Carles Cufí
commit 8076c8095b
3 changed files with 61 additions and 21 deletions

View file

@ -1338,6 +1338,16 @@ const char *k_thread_name_get(k_tid_t thread_id);
__syscall int k_thread_name_copy(k_tid_t thread_id, char *buf,
size_t size);
/**
* @brief Get thread state string
*
* Get the human friendly thread state string
*
* @param thread_id Thread ID
* @retval Thread state string, empty if no state flag is set
*/
const char *k_thread_state_str(k_tid_t thread_id);
/**
* @}
*/