Messages in this thread | | | Date | Thu, 6 Nov 2008 07:57:51 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH] rcupdate: move synchronize_sched() back to rcupdate.c V2 |
| |
* Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
> this fix remove ugly macro, and increase readability for rcupdate codes
looks good to me, if Paul acks the concept too.
Two small details:
> +++ b/include/linux/rcuclassic.h > @@ -32,6 +32,7 @@ > > #ifndef __LINUX_RCUCLASSIC_H > #define __LINUX_RCUCLASSIC_H > +#define HAVE_SPECIAL_RCU_BH
please use def_bool to define CONFIG_RCU_HAVE_SPECIAL_RCU_BH
and:
> +#else > +#define rcu_bh_qsctr_inc(cpu) > +#define rcu_read_lock_bh() { rcu_read_lock(); local_bh_disable(); } > +#define rcu_read_unlock_bh() { local_bh_enable(); rcu_read_unlock(); } > +#endif /* HAVE_SPECIAL_RCU_BH */
use inline functions please. CPP defines should never be used in new code. (use inlines instead of macros and enums/const instead of constant #define's)
Ingo
| |