Re: Re: current task and pid assignment to a pointer

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

 



On 5/9/06, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hello....

> > Try to do like below:
> > struct task_struct *p = current
> >
> > In other word, maybe you need to enforce type cast....
>
> What is difference between p = current and struct task_struct *p =
> current. Casting like what? how willl i cast in this case? any
> pointer?

Hmm, I tested your snippet on my RH 9 box (gcc version 3.2.2, kernel
2.4.20-19.9) and it worked fine. So, I take back my suggestion.

BTW, which gcc version did you use?

Since the snippet was absurdly incomplete, I'm going to venture a
guess of a missing #include. Is linux/sched.h included in the complete
code?

> > looking at your complete code, maybe it is just printk that showed
> > you the message priority. What debug features  you had enabled ?
>
> I know this because i have enabled timing infornations in the printks
> while compiling the kernel. So i can figure it out if it is the same
> printk output or not and i think it is the same.

OK, no idea. But if you can show us the whole code, maybe I or somebody
else can find out why it happened...

Let's make this a rule. Always show all the code. It's useless to show
a snippet that's 3 lines long.

Thanks,
Nish

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