1 /* 2 * Copyright (C) 2015-2018 Alibaba Group Holding Limited 3 */ 4 5 #ifndef DEBUG_INFOGET_H 6 #define DEBUG_INFOGET_H 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 /** 13 * This function will get task handle by its name. 14 */ 15 ktask_t *debug_task_find(char *name); 16 17 /** 18 * This function will return the running task and its name. 19 */ 20 ktask_t *debug_task_find_running(char **name); 21 22 /** 23 * This function will get task handle by its id. 24 */ 25 ktask_t *debug_task_find_by_id(uint32_t task_id); 26 27 /** 28 * This function will return true if task is running. 29 */ 30 int debug_task_is_running(ktask_t *task); 31 32 /** 33 * This function will return the running task_id, 0 means isr 34 */ 35 uint32_t debug_task_id_now(); 36 37 /** 38 * This function will get the bottom of task stack 39 * @param[in] task NULL for active task 40 * @return the bottom of stack 41 */ 42 void *debug_task_stack_bottom(ktask_t *task); 43 44 #ifdef __cplusplus 45 } 46 #endif 47 48 #endif /* DEBUG_INFOGET_H */ 49