Re: [this_cpu_xx V4 01/20] Introduce this_cpu_ptr() and generic this_cpu_* operations
From: Rusty Russell
Date: Tue Oct 06 2009 - 19:29:16 EST
On Sat, 3 Oct 2009 02:41:54 am Christoph Lameter wrote:
> On Fri, 2 Oct 2009, Ingo Molnar wrote:
>
> > > @@ -66,6 +69,8 @@ extern void setup_per_cpu_areas(void);
> > > #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))
> > > #define __get_cpu_var(var) per_cpu_var(var)
> > > #define __raw_get_cpu_var(var) per_cpu_var(var)
> > > +#define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
> > > +#define __this_cpu_ptr(ptr) this_cpu_ptr(ptr)
I still think that it's not symmetrical: get_cpu_var implies get_cpu_ptr; there's no
"this" in any Linux API until now.
OTOH, this_cpu_<op> makes much more sense than cpu_<op> or something, so I'm
not really going to complain.
Does this mean we can kill local.h soon?
Thanks for all this!
Rusty.
--
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/