[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YovasFyOcKB6ZanQ@slm.duckdns.org>
Date: Mon, 23 May 2022 09:04:16 -1000
From: Tejun Heo <tj@...nel.org>
To: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3] workqueue: Wrap flush_workqueue() using a macro
On Sat, May 21, 2022 at 08:37:19PM +0900, Tetsuo Handa wrote:
> +/*
> + * Detect attempt to flush system-wide workqueues at compile time when possible.
> + *
> + * Always warn, for there is no in-tree flush_workqueue(system_*_wq) user.
> + */
> +#define flush_workqueue(wq) \
> +do { \
> + if ((__builtin_constant_p(&(wq) == &system_wq) && \
> + &(wq) == &system_wq) || \
> + (__builtin_constant_p(&(wq) == &system_highpri_wq) && \
> + &(wq) == &system_highpri_wq) || \
> + (__builtin_constant_p(&(wq) == &system_long_wq) && \
> + &(wq) == &system_long_wq) || \
> + (__builtin_constant_p(&(wq) == &system_unbound_wq) && \
> + &(wq) == &system_unbound_wq) || \
> + (__builtin_constant_p(&(wq) == &system_freezable_wq) && \
> + &(wq) == &system_freezable_wq) || \
> + (__builtin_constant_p(&(wq) == &system_power_efficient_wq) && \
> + &(wq) == &system_power_efficient_wq) || \
> + (__builtin_constant_p(&(wq) == &system_freezable_power_efficient_wq) && \
> + &(wq) == &system_freezable_power_efficient_wq)) \
> + __warn_flushing_systemwide_wq(); \
> + flush_workqueue(wq); \
> +} while (0)
Please just rename the backend function.
Thanks.
--
tejun
Powered by blists - more mailing lists