Re: [PATCH] per-cpu patch 2/3

From: Rusty Russell (rusty@rustcorp.com.au)
Date: Thu Jul 18 2002 - 20:36:20 EST


In message <1027011926.1086.118.camel@sinai> you write:
> On Wed, 2002-07-17 at 20:48, Rusty Russell wrote:
> > Given the ongoing races with smp_processor_id() and preempt, this
> > makes sense to me. this_cpu() was too generic a name anyway.
>
> Very nice, although:
>
> How do you reenable preemption?

I think you are confused: this patch is an enhancement of the per-cpu
variable infrastructure. I was making an analogy with
smp_processor_id().

+#define get_cpu_var(var) ({ preempt_disable(); __get_cpu_var(var); })
+#define put_cpu_var(var) preempt_enable()

Clear?
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:28 EST