From: "Michael R. Zucca" <mrz5149@acm.org>
To: David Edelsohn <dje@watson.ibm.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: fetch_and_add() available on PPC Linux?
Date: Thu, 6 Dec 2001 08:07:41 -0500 [thread overview]
Message-ID: <l03130301b8351d769a73@[192.168.1.2]> (raw)
In-Reply-To: <200112060417.XAA24928@makai.watson.ibm.com>
At 11:17 PM -0500 12/5/01, David Edelsohn wrote:
>0:
> lwarx %1,0,%4 # oval = (*ptr) [linked]
> add%I3 %2,%1,%3 # tmp = oval + val
> stwcx. %2,0,%4 # (*ptr) = tmp [conditional]
> bne- 0b # if (store failed) retry
The only caveat is that the ptr to any two of these items must be in
individual lock granules. If the software has an array of locks that are
just a bunch of long-words, there's going to be difficultly. However, given
that this was an AIX box, and was probably a POWER machine, it's likely
that the POWER machine has the same lock granule restriction.
See the PPC manual for the lock granule size. I forget what it is off the
top of my head.
____________________________________________________________________
Michael Zucca - mrz5149@acm.org
"I will choose a path that's clear. I will choose Freewill. "
--Rush, Freewill
____________________________________________________________________
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-12-06 13:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-06 3:56 fetch_and_add() available on PPC Linux? rayson_ho
2001-12-06 4:17 ` David Edelsohn
2001-12-06 13:07 ` Michael R. Zucca [this message]
2001-12-06 13:46 ` Holger Bettag
2001-12-06 14:07 ` fetch_and_add() available on PPC Linux?Hi, Kevin B. Hendricks
2001-12-06 15:00 ` Wolfgang Denk
2001-12-06 21:51 ` Kevin B. Hendricks
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='l03130301b8351d769a73@[192.168.1.2]' \
--to=mrz5149@acm.org \
--cc=dje@watson.ibm.com \
--cc=linuxppc-dev@lists.linuxppc.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 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).