lkml.org 
[lkml]   [2015]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/24] proc: pick out a function to iterate task children
On 07/06, Andrey Vagin wrote:
>
> -static struct pid *
> -get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
> +static struct task_struct *
> +task_next_child(struct task_struct *parent, struct task_struct *prev, unsigned int pos)
> {

I won't really argue, just a question...

So this patch changes it to accept/return task_struct rather pid. Why?
it is better to get/put "struct pid" only, not the whole task_struct.

If another caller want task_struct, the necessary conversion is simple.
But again, I won't argue if you think this will complicate the non-proc
users of this helper.

Oleg.



\
 
 \ /
  Last update: 2015-07-14 20:21    [W:0.204 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site