lkml.org 
[lkml]   [2012]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v7
On Thu, Jan 19, 2012 at 03:14:05PM -0800, Eric W. Biederman wrote:
...
> >
> >> > +static int children_seq_show(struct seq_file *seq, void *v)
> >> > +{
> >> > + struct inode *inode = seq->private;
> >> > + unsigned long pid;
> >> > +
> >> > + pid = (unsigned long)pid_nr_ns(v, inode->i_sb->s_fs_info);
> >> > + return seq_printf(seq, " %lu", pid);
> >> > +}
> >>
> >> just noticed... why unsigned long and %lu? afaics pid_t/%d should work
> >> without any typecasts.
> >>
> >
> > I'm not sure how important it is, but Andrew mentioned in one of email
> > that we might be moving from pid_t from int to long one day (which of
> > course will require extreme huge work on checking code where int->long
> > transition might cause problems). So I thought why should I wait then?
> >
> > [ Andrew, am I correct? ]
>
> It is going to take a lot to get to a > 32bit pid value. I would not
> worry about it today unless there is some 64bit arch somewhere that defines
> pid_t as long.
>

Yeah, it seems I overdone here ;) I've sent updated version with pid_t.

Cyrill


\
 
 \ /
  Last update: 2012-01-20 07:33    [W:0.079 / U:3.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site