diff --git a/mod_hello.c b/mod_hello.c index 4119ca9..02b5b36 100644 --- a/mod_hello.c +++ b/mod_hello.c @@ -1,6 +1,8 @@ #include /* all kernel modules need this */ #include /* provides initialization routines */ +#include + #include #include @@ -47,6 +49,9 @@ static int __init hello_init(void) unsigned long jiffies_start, jiffies_diff; unsigned long sym_addr; + // in linux/sched.h + //struct task_struct *current; + printk("[%s] pid: %d, comm: %s\n", __this_module.name, current->pid, current->comm); hello_print_hello();