mirror of
https://github.com/HEYAHONG/HCppBox.git
synced 2025-10-14 02:27:41 +08:00
[hsimulator/risc-v] 添加ps命令查看运行线程
This commit is contained in:
@@ -383,14 +383,14 @@
|
||||
* are used by trace and visualisation functions and tools. Set to 0 to exclude
|
||||
* the additional information from the structures. Defaults to 0 if left
|
||||
* undefined. */
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
|
||||
/* Set to 1 to include the vTaskList() and vTaskGetRunTimeStats() functions in
|
||||
* the build. Set to 0 to exclude these functions from the build. These two
|
||||
* functions introduce a dependency on string formatting functions that would
|
||||
* otherwise not exist - hence they are kept separate. Defaults to 0 if left
|
||||
* undefined. */
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||
|
||||
/******************************************************************************/
|
||||
/* Co-routine related definitions. ********************************************/
|
||||
|
@@ -140,6 +140,15 @@ static int cmd_free_entry(int argc,const char *argv[])
|
||||
};
|
||||
HSHELL_COMMAND_EXPORT(free,cmd_free_entry,show memory info);
|
||||
|
||||
|
||||
static int cmd_ps_entry(int argc,const char *argv[])
|
||||
{
|
||||
hshell_context_t * hshell_ctx=hshell_context_get_from_main_argv(argc,argv);
|
||||
char strbuff[4096];
|
||||
strbuff[sizeof(strbuff)-1]='\0';
|
||||
vTaskList(strbuff);
|
||||
hshell_printf(hshell_ctx,"%s\r\n",strbuff);
|
||||
return 0;
|
||||
};
|
||||
HSHELL_COMMAND_EXPORT(ps,cmd_ps_entry,show process info);
|
||||
|
||||
|
||||
|
@@ -231,7 +231,7 @@ void main_init(const hruntime_function_t *func)
|
||||
}
|
||||
hshell_printf(NULL,"HBox Init(tick=%llu)!\r\n",(unsigned long long)hdefaults_tick_get());
|
||||
|
||||
xTaskCreate( shell_task, "shell_task",4096, NULL, 1, NULL );
|
||||
xTaskCreate( shell_task, "shell_task",8192, NULL, 1, NULL );
|
||||
|
||||
}
|
||||
HRUNTIME_INIT_EXPORT(main,255,main_init,NULL);
|
||||
|
Reference in New Issue
Block a user