Re: compiler error in simple module

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

 



Sorry, there was a typo. it is list_for_each_entry

On Tue, Jan 11, 2011 at 1:25 PM, Prabhu nath <gprabhunath@xxxxxxxxx> wrote:
If you are interested to print some fields of all task_structs. Use the following macro. It will walk thru the entire list of task_struct, starting from the current task.

struct task_struct *tskParse;
list_for_each_entry (tskParse, &(current->tasks), tasks)
{
  printk (KERN_INFO "task name = %s \n", tskParse->comm)
 
}

Regards,
Prabhu


On Tue, Jan 11, 2011 at 11:32 AM, Hanumant Singh <hanumant07@xxxxxxxxx> wrote:
Hi

   I am trying to write a simple module that sort of emulates the ps command. I am trying to get the comm string for the task, using get_task_comm, but the make command keeps telling me that the symbol get_task_comm is not defined. I have included linux/sched.h. This is the header file, which I believe has the prototype definition for the function. Am I missing something?

Thanks
Hanumant

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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