Re: current task and pid assignment to a pointer

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

 



Hi,

Le Tue, 9 May 2006 13:13:06 +0530,
"pradeep singh" <2500.pradeep@xxxxxxxxx> a écrit :

> 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?

Are you sure that the error message you giving us correspond to the
code you're giving ?

I don't see why it could not compile, and I tested it myself, it of
course worked.

Sincelry,

Thomas
-- 
PETAZZONI Thomas - thomas.petazzoni@xxxxxxxx 
http://{thomas,sos,kos}.enix.org - Jabber: thomas.petazzoni@xxxxxxxxx
http://{agenda,livret}dulibre.org - http://www.toulibre.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7

Attachment: signature.asc
Description: PGP signature


[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