All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Froyd <froydnj@codesourcery.com>
To: Peter W Schultz <kaedenn@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Implementing atomic SWP in qemu-arm
Date: Wed, 18 Aug 2010 12:37:19 -0700	[thread overview]
Message-ID: <20100818193719.GW25394@codesourcery.com> (raw)
In-Reply-To: <AANLkTinyhZUyXpj1O6hqEZSMmsRzgvO1YfCGH6wRjYOK@mail.gmail.com>

On Wed, Aug 18, 2010 at 12:15:09PM -0700, Peter W Schultz wrote:
> How would I go about modifying the qemu source to implement SWP
> atomically? I have been studying the source for a few days now, and I
> am at a loss as to what all needs to be done.

You should look at how the load/store-exclusive instructions work and
see if you can use a similar mechanism.  It should be fairly
straightforward.

> I feel it would be most desirable to add a TCG_SWAP instruction that
> is guaranteed to be an atomic compare-and-swap, and implement that as
> needed.

I believe there was an thread several months ago discussing doing this
or something similar and it was decided that mechanism was not the way
to go.

-Nathan

      reply	other threads:[~2010-08-18 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 19:15 [Qemu-devel] Implementing atomic SWP in qemu-arm Peter W Schultz
2010-08-18 19:37 ` Nathan Froyd [this message]

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=20100818193719.GW25394@codesourcery.com \
    --to=froydnj@codesourcery.com \
    --cc=kaedenn@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.