From 76213bc8bcb3d95a229e697e178d5f69ee542fa9 Mon Sep 17 00:00:00 2001 From: zy Date: Tue, 5 Dec 2023 04:42:53 -0500 Subject: [PATCH] code clean --- source/ucli/ucli.cc | 5 +++-- testcase/userstack.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/ucli/ucli.cc b/source/ucli/ucli.cc index 750f1d4..4f63ebe 100644 --- a/source/ucli/ucli.cc +++ b/source/ucli/ucli.cc @@ -122,12 +122,12 @@ static int task_info_extract(void *buf, unsigned int len, void *) { printk_task_brief(&tsk_info->task); // diag_printf_raw_stack(tsk_info->task.tgid, tsk_info->task.container_tgid, // tsk_info->task.comm, &tsk_info->raw_stack); - printf("run_in_host: %d\n", run_in_host); + // printf("run_in_host: %d\n", run_in_host); diag_printf_raw_stack(run_in_host ? tsk_info->task.tgid : tsk_info->task.container_tgid, tsk_info->task.container_tgid, tsk_info->task.comm, &tsk_info->raw_stack); - test(tsk_info); + // test(tsk_info); diag_printf_kern_stack(&tsk_info->kern_stack); printf("#* 0xffffffffffffff %s (UNKNOWN)\n", tsk_info->task.comm); @@ -209,6 +209,7 @@ static void do_tgid(char *arg) { int main(int argc, char *argv[]) { run_in_host = check_in_host(); + printf("run_in_host: %d\n", run_in_host); for (int i = 0; i < argc; i++){ printf("argv[%d]: %s\n", i, argv[i]); diff --git a/testcase/userstack.c b/testcase/userstack.c index 003f19e..5da72c7 100644 --- a/testcase/userstack.c +++ b/testcase/userstack.c @@ -43,7 +43,7 @@ void *customFunction1(void *n) { while (1) { sleep(1); } // never return, keep stack - return NULL; + // return NULL; } else { printf("Calling customFunction2\n"); customFunction2(num-1); @@ -59,7 +59,7 @@ void customFunction2(int n) { while (1) { sleep(1); } // never return, keep stack - return NULL; + // return NULL; } customFunction3(n-1); } @@ -72,7 +72,7 @@ void customFunction3(int n) { while (1) { sleep(1); } // never return, keep stack - return NULL; + // return NULL; } customFunction2(n-1); }