diff --git a/study/process/list/list_process.c b/study/process/list/list_process.c index 1dbdce2..7842d28 100644 --- a/study/process/list/list_process.c +++ b/study/process/list/list_process.c @@ -46,11 +46,14 @@ static int list_process_init(void) // because the list of process is an double-linked circular list // we can also list all the process from the current process + /* list_for_each(pos, ¤t->children) { pTask = list_entry(pos, struct task_struct, sibling); printk(KERN_ALERT "%d\t%s\n", pTask->pid, pTask->comm); } + */ + break; case 2 : method = "for_each_process"; @@ -79,7 +82,7 @@ static int list_process_init(void) static void list_process_exit(void) { - printk(KERN_ALERT "GOOD BYE!!\n"); + printk(KERN_ALERT "GOOD BYE--list process!!\n"); }