lkml.org 
[lkml]   [2008]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-11-06 08:01    [W:0.279 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site