Thread (7 messages) 7 messages, 4 authors, 2011-01-11

compiler error in simple module

From: Hanumant Singh <hidden>
Date: 2011-01-11 16:04:41

On Mon, Jan 10, 2011 at 11:55 PM, Prabhu nath [off-list ref] wrote:
Sorry, there was a typo. it is list_for_each_entry

On Tue, Jan 11, 2011 at 1:25 PM, Prabhu nath [off-list ref]wrote:
quoted
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

      I am using a macro for_each_process () that allows you to iterate
over the list of processes.

       Hanumant
quoted
On Tue, Jan 11, 2011 at 11:32 AM, Hanumant Singh [off-list ref]wrote:
quoted
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 at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110111/b1e52987/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help