From f2a6cc426774a27a8fe2936e0c3cf1104453834c Mon Sep 17 00:00:00 2001 From: gatieme Date: Mon, 9 May 2016 14:37:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=86=E9=81=8D=E5=8E=86?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=BF=9B=E7=A8=8B=E7=9A=84=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E4=BB=A3=E7=A0=81...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- study/process/list/list_process.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/study/process/list/list_process.c b/study/process/list/list_process.c index 3fade23..1dbdce2 100644 --- a/study/process/list/list_process.c +++ b/study/process/list/list_process.c @@ -12,6 +12,7 @@ #include #include +//#include @@ -53,10 +54,10 @@ static int list_process_init(void) break; case 2 : method = "for_each_process"; - for_each_process(task) + for_each_process(pTask) { count++; - printk(KERN_ALERT "%d\t%s\n", task->pid, task->comm); + printk(KERN_ALERT "%d\t%s\n", pTask->pid, pTask->comm); } break; case 3 : @@ -72,7 +73,7 @@ static int list_process_init(void) printk(KERN_ALERT "The method is %s\n", method); printk(KERN_ALERT "there are %d process in your system now...\n", count); - + printk(KERN_ALERT "current : %d\t%s\n", current->pid, current->comm); return 0; }