mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 14:31:46 +00:00
rcu: Combine DEFINE_SRCU() and DEFINE_STATIC_SRCU()
The DEFINE_SRCU() and DEFINE_STATIC_SRCU() definitions are quite similar, so this commit combines them, saving a bit of code and removing redundancy. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
a5c198f4f7
commit
9735af5c78
1 changed files with 4 additions and 6 deletions
|
@ -102,13 +102,11 @@ void process_srcu(struct work_struct *work);
|
||||||
* define and init a srcu struct at build time.
|
* define and init a srcu struct at build time.
|
||||||
* dont't call init_srcu_struct() nor cleanup_srcu_struct() on it.
|
* dont't call init_srcu_struct() nor cleanup_srcu_struct() on it.
|
||||||
*/
|
*/
|
||||||
#define DEFINE_SRCU(name) \
|
#define __DEFINE_SRCU(name, is_static) \
|
||||||
static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\
|
static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\
|
||||||
struct srcu_struct name = __SRCU_STRUCT_INIT(name);
|
is_static struct srcu_struct name = __SRCU_STRUCT_INIT(name)
|
||||||
|
#define DEFINE_SRCU(name) __DEFINE_SRCU(name, /* not static */)
|
||||||
#define DEFINE_STATIC_SRCU(name) \
|
#define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static)
|
||||||
static DEFINE_PER_CPU(struct srcu_struct_array, name##_srcu_array);\
|
|
||||||
static struct srcu_struct name = __SRCU_STRUCT_INIT(name);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call_srcu() - Queue a callback for invocation after an SRCU grace period
|
* call_srcu() - Queue a callback for invocation after an SRCU grace period
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue