Sorry, there was a typo. it is list_for_each_entry<br><br><div class="gmail_quote">On Tue, Jan 11, 2011 at 1:25 PM, Prabhu nath <span dir="ltr">&lt;<a href="mailto:gprabhunath@gmail.com">gprabhunath@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">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.<br>
<br>struct task_struct *tskParse;<br>list_for_each_entry (tskParse, &amp;(current-&gt;tasks), tasks)<br>
{<br>  printk (KERN_INFO &quot;task name = %s \n&quot;, tskParse-&gt;comm)<br> <br>}<br><br>Regards,<br><font color="#888888">Prabhu<br><br><br></font><div class="gmail_quote"><div class="im">On Tue, Jan 11, 2011 at 11:32 AM, Hanumant Singh <span dir="ltr">&lt;<a href="mailto:hanumant07@gmail.com" target="_blank">hanumant07@gmail.com</a>&gt;</span> wrote:<br>

</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">Hi<div><br></div><div>   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?</div>


<div><br></div><div>Thanks</div><div>Hanumant</div>
<br></div></div><div class="im">_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br>