Re: [PATCH v3 4/9] percpu-refcount: Introduce percpu_ref_read()

Tejun Heo
2018-08-02T19:06:49Z

Hello,

On Thu, Aug 02, 2018 at 11:29:39AM -0700, Bart Van Assche wrote:
> Introduce a function that allows to read the value of a per-cpu counter.
> This function will be used in the next patch to check whether a per-cpu
> counter in atomic mode has the value one.

I'm not a big fan of exposing this. If you need to test for atomic &&
1, I'd much prefer a helper specifically testing for that. But can
you please explain a bit why you need this?

Thanks.

--
tejun