Re: [PATCH] (18/22) task_thread_info - part 2/4

From: Al Viro
Date: Thu Aug 25 2005 - 08:10:05 EST


On Thu, Aug 25, 2005 at 10:41:27AM +0200, Geert Uytterhoeven wrote:
> >
> > +static inline void setup_thread_info(struct task_struct *p, struct thread_info *ti)
> ^^^^^^^^^^^^^^^^^^^^^
> const struct task_struct *p?

Umm... Wouldn't be a problem, but what does it buy? The only caller
has p very much _not_ const pointer and since it's inlined, you won't
gain any optimizations in the caller out of it.

> > +{
> > + *ti = *p->thread_info;
> > +}
> > +
> > +static inline unsigned long *end_of_stack(struct task_struct *p)
> ^^^^^^^^^^^^^^^^^^^^^
> const struct task_struct *p?

That one is OK, but then you really want const pointer out of it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/