[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87czqlsatw.ffs@tglx>
Date: Tue, 10 Aug 2021 15:12:11 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Mingzhe Yang <cainiao666999@...il.com>, peterz@...radead.org
Cc: linux-kernel@...r.kernel.org, yuxin.wooo@...il.com,
becausehan@...il.com, huan.xie@...e.com,
Mingzhe Yang <cainiao666999@...il.com>
Subject: Re: [PATCH] tasklets: simplify code in tasklet_action_common()
On Fri, Apr 30 2021 at 20:25, Mingzhe Yang wrote:
> Use tasklet_is_disabled() to simplify the code in
> tasklet_action_common.
This changelog is not really helpful. Use a new function does not tell
anything. Neither does it explain why there need to be two new functions
and worse
> +static inline bool tasklet_is_enabled(struct tasklet_struct *t)
> +{
> + smp_rmb();
why there is suddenly a new undocumented SMP barrier in the code.
> + return !atomic_read(&t->count);
> +}
> +
> +static inline bool tasklet_is_disabled(struct tasklet_struct *t)
> +{
> + return !tasklet_is_enabled(t);
> +}
> +
Aside of that there is no point in exposing these functions in a global
header.
Thanks,
tglx
Powered by blists - more mailing lists