ARCHITECTURES SUPPORTED
-----------------------
-Currently, x86 (i386, i486, i586, i686), x86 64-bit, PowerPC 32/64, S390 and
-S390x are supported. Only tested on Linux so far, but should theoretically work
-on other operating systems.
+Currently, x86 (i386, i486, i586, i686), x86 64-bit, PowerPC 32/64, S390, S390x
+and Sparc64 are supported. Only tested on Linux so far, but should
+theoretically work on other operating systems.
QUICK START GUIDE
-----------------
switch (len) {
case 4:
{
- unsigned int old;
+ unsigned int old, oldt;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read((unsigned int *)addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, val, 4);
#if (BITS_PER_LONG == 64)
case 8:
{
- unsigned long old;
+ unsigned long old, oldt;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read((unsigned long *)addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, val, 8);
switch (len) {
case 4:
{
- unsigned int old;
+ unsigned int old, oldt;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read((unsigned int *)addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, old + val, 4);
#if (BITS_PER_LONG == 64)
case 8:
{
- unsigned long old;
+ unsigned long old, oldt;
- oldt = uatomic_read(addr);
+ oldt = uatomic_read((unsigned long *)addr);
do {
old = oldt;
oldt = _uatomic_cmpxchg(addr, old, old + val, 8);