public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	pavel@ucw.cz, len.brown@intel.com, mingo@elte.hu,
	akpm@linux-foundation.org, suresh.b.siddha@intel.com,
	lucas.demarchi@profusion.mobi,
	linux-pm@lists.linux-foundation.org, rusty@rustcorp.com.au,
	vatsa@linux.vnet.ibm.com, ashok.raj@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CPU hotplug, freezer: Fix bugs in CPU hotplug call path
Date: Mon, 03 Oct 2011 12:03:35 +0200	[thread overview]
Message-ID: <1317636215.12973.16.camel@twins> (raw)
In-Reply-To: <4E88BF33.10407@linux.vnet.ibm.com>

On Mon, 2011-10-03 at 01:14 +0530, Srivatsa S. Bhat wrote:
> +static atomic_t tasks_frozen = ATOMIC_INIT(0);
> +
> +void set_tasks_frozen_flag(void)
> +{
> +       atomic_set(&tasks_frozen, 1);
> +}
> +
> +void clear_tasks_frozen_flag(void)
> +{
> +       atomic_set(&tasks_frozen, 0);
> +}
> +
> +int tasks_are_frozen(void)
> +{
> +       int ret;
> +       ret = atomic_read(&tasks_frozen);
> +       return ret;
> +} 

What's the point of using atomic_t here? Neither set nor read are
actually atomic ops.

  reply	other threads:[~2011-10-03 10:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 19:44 [PATCH] CPU hotplug, freezer: Fix bugs in CPU hotplug call path Srivatsa S. Bhat
2011-10-03 10:03 ` Peter Zijlstra [this message]
2011-10-04 13:19   ` Srivatsa S. Bhat
2011-10-04 13:28     ` [PATCH v2] " Srivatsa S. Bhat
2011-10-04 13:37       ` Peter Zijlstra
2011-10-07 20:56         ` Srivatsa S. Bhat
2011-10-08 12:52           ` Américo Wang
2011-10-08 20:28             ` Srivatsa S. Bhat
2011-10-10 10:48           ` Peter Zijlstra
2011-10-21 11:30             ` Srivatsa S. Bhat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317636215.12973.16.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=ashok.raj@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=rusty@rustcorp.com.au \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=vatsa@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox