Re: 2.5.38-mm2 [PATCH]

Dipankar Sarma
2002-09-23T17:33:40Z

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.