lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200911101132.GC165568@hirez.programming.kicks-ass.net>
Date:   Fri, 11 Sep 2020 12:11:32 +0200
From:   peterz@...radead.org
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Rafael Wysocki <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Lukasz Luba <lukasz.luba@....com>, cristian.marussi@....com,
        sudeep.holla@....com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] cpufreq: stats: Defer stats update to
 cpufreq_stats_record_transition()

On Wed, Sep 02, 2020 at 12:54:41PM +0530, Viresh Kumar wrote:
> +	atomic_t reset_pending;

> +	atomic_set(&stats->reset_pending, 0);
> +	if (atomic_read(&stats->reset_pending))
> +	bool pending = atomic_read(&stats->reset_pending);
> +	atomic_set(&stats->reset_pending, 1);
> +	bool pending = atomic_read(&stats->reset_pending);
> +	if (atomic_read(&stats->reset_pending))

What do you think atomic_t is doing for you?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ