diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2020-01-17 10:01:35 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-01-24 20:40:08 +0100 |
commit | 5671d814dbd204b4ecc705045b5f1a647bff6f3b (patch) | |
tree | 5748dce77b017f603958d4350703f439f2cfb257 /include | |
parent | def9d2780727cec3313ed3522d0123158d87224d (diff) | |
download | linux-5671d814dbd204b4ecc705045b5f1a647bff6f3b.tar.bz2 |
smp: Use smp_cond_func_t as type for the conditional function
Use a typdef for the conditional function instead defining it each time in
the function prototype.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20200117090137.1205765-2-bigeasy@linutronix.de
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/smp.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index 6fc856c9eda5..4734416855aa 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -15,6 +15,7 @@ #include <linux/llist.h> typedef void (*smp_call_func_t)(void *info); +typedef bool (*smp_cond_func_t)(int cpu, void *info); struct __call_single_data { struct llist_node llist; smp_call_func_t func; @@ -49,13 +50,12 @@ void on_each_cpu_mask(const struct cpumask *mask, smp_call_func_t func, * cond_func returns a positive value. This may include the local * processor. */ -void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info), - smp_call_func_t func, void *info, bool wait, - gfp_t gfp_flags); +void on_each_cpu_cond(smp_cond_func_t cond_func, smp_call_func_t func, + void *info, bool wait, gfp_t gfp_flags); -void on_each_cpu_cond_mask(bool (*cond_func)(int cpu, void *info), - smp_call_func_t func, void *info, bool wait, - gfp_t gfp_flags, const struct cpumask *mask); +void on_each_cpu_cond_mask(smp_cond_func_t cond_func, smp_call_func_t func, + void *info, bool wait, gfp_t gfp_flags, + const struct cpumask *mask); int smp_call_function_single_async(int cpu, call_single_data_t *csd); |