# Re: fetch\_and\_add() available on PPC Linux?

- From: Holger Bettag \<hidden\>
- Date: 2001-12-06 13:46:11 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2001/12/9380378
- Thread: https://ratatoskr.run/linuxppc-dev/2001/12/9380378/t.md

```text

"Michael R. Zucca" [ref] writes:

[...]
> 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.
>
It is architected to be one cache block. On the 'desktop' PowerPCs (6xx, 7xx,
7xxx) that currently means 32 bytes. Some embedded models (4xx, 5xx?) have
cache blocks of 16 bytes.

  Holger


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
```
