current task and pid assignment to a pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all
I tried a simple snippet like
...
struct task_struct *p;
p = current;
printk(KERN_DEBUG "%u", p->pid);
...

Its gave me an error compiling the module with message "error:
dereferencing pointer to incomplete type" , but i can use current->pid
and it compiles fine. Why is then using p giving me an error?

Second When i looked at the dmesg after insmod i found the pid
3846,fine to me but when i rmmod the module i found that the same
entery has change to 3846<7> . Why didnt the KERN_DEBUG priority i.e
<7> is printed earlier?

I have compiled my 2.6.16 kernel with some debug features, is it
because of this or am i missing something here?

Any pointers?

Thank you
--
play the game

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux