public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* get_task_struct()
@ 2004-04-17 15:46 Fabiano Ramos
  2004-04-17 16:19 ` get_task_struct() Robert Love
  0 siblings, 1 reply; 2+ messages in thread
From: Fabiano Ramos @ 2004-04-17 15:46 UTC (permalink / raw)
  To: linux-kernel

Dear All,

Inside sys_ptrace, the function get_task_struct is invoked after
retrieving the child's task srtuct pointer. Why is it done? I have
tracked down the code and noticed that it is in fact an increment
on the (page?) counter. Can you help me understand it? 

Is it necessary to call free_task_struct whenever its get counterpart
is called?


** arch/i386/kernel/ptrace.c
>  read_lock(&tasklist_lock);
>  child = find_task_by_pid(pid);
>  if (child)
>              get_task_struct(child);
>  read_unlock(&tasklist_lock);

Thanks in advance,
Fabiano


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-17 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-17 15:46 get_task_struct() Fabiano Ramos
2004-04-17 16:19 ` get_task_struct() Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox