Re: 2.5.38-mm2 [PATCH]

Dipankar Sarma (dipankar@in.ibm.com)
Mon, 23 Sep 2002 23:03:40 +0530


On Mon, Sep 23, 2002 at 09:28:41AM -0700, Andrew Morton wrote:
> #ifdef CONFIG_PREEMPTION
> #define rcu_read_lock() preempt_disable()
> #define rcu_read_unlock() preempt_enable()
> #else
> #define rcu_read_lock() do {} while(0)
> #define rcu_read_unlock() do {} while(0)
> #endif
>
> with
>
> #define rcu_read_lock() preempt_disable()
> #define rcu_read_unlock() preempt_enable()
>
> because preempt_disable() is a no-op on CONFIG_PREEMPT=n anyway.

This is fine. The original rcu_ltimer patch needed #ifdef CONFIG_PREEMPT,
so that it could be easily used with 2.4. With preemption in 2.5,
rcu_read_xxx() can be preempt_xxx().

Thanks

-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.
-
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/