linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linuxppc <linuxppc-dev@ozlabs.org>,
	Andrew Morton <akpm@linuxfoundation.org>,
	Bob Nelson <rrnelson@linux.vnet.ibm.com>,
	oprofile <oprofile-list@lists.sourceforge.net>,
	Philippe Elie <phil.el@wanadoo.fr>
Subject: Re: [PATCH 1/2] Enable SPU switch notification to detect currently active SPU tasks.
Date: Fri, 13 Jul 2007 22:34:50 +1000	[thread overview]
Message-ID: <1184330090.6059.219.camel@localhost.localdomain> (raw)
In-Reply-To: <20070713101233.GA12426@lst.de>


> > +		if (unlikely(test_bit(SPU_SCHED_NOTIFY_ACTIVE,
> > +				      &ctx->sched_flags))) {
> > +			clear_bit(SPU_SCHED_NOTIFY_ACTIVE, &ctx->sched_flags);
> 
> this should use test_and_clear_bit

This also looks like an abuse of atomics to effectively implement a lock
or did I miss something ?

Ben.

  parent reply	other threads:[~2007-07-13 12:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12 23:45 [PATCH 1/2] Enable SPU switch notification to detect currently active SPU tasks Bob Nelson
2007-07-13 10:12 ` Christoph Hellwig
2007-07-13 10:13   ` Christoph Hellwig
2007-07-13 12:34   ` Benjamin Herrenschmidt [this message]
2007-07-13 12:45     ` Christoph Hellwig
2007-07-13 13:25   ` Christoph Hellwig

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=1184330090.6059.219.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=oprofile-list@lists.sourceforge.net \
    --cc=phil.el@wanadoo.fr \
    --cc=rrnelson@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;
as well as URLs for NNTP newsgroup(s).