On 04/30/07 22:01, Chris Elving wrote:
[EMAIL PROTECTED] wrote:
If those APIs do what their names suggests, what is the point
in having them?
"Atomic set" can hardly be anything other than a normal store
nor can "Atomic read" be much different from an ordinary read.
I'd find them useful.
For example, Studio 11 with -xarch=sparcv8plus can generate two separate
32-bit ld instructions to load a single 64-bit value. An
atomic_load_64(3C) function would be useful to ensure that a single ldx
instruction is used.
You will always obtain the same result - the unit of cache coherency is
64 bytes (the size of a cacheline or cache sub-block in sparc systems).
The term "atomic" is sometimes used in this sense, but the more common
use is for exclusive atomic operations such as compare-and-swap.
Gavin
_______________________________________________
opensolaris-discuss mailing list
[email protected]