oldt = uatomic_read((unsigned char *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, old + val, 1);
+ oldt = uatomic_cmpxchg((unsigned char *)addr,
+ old, old + val);
} while (oldt != old);
return old + val;
oldt = uatomic_read((unsigned short *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, old + val, 2);
+ oldt = uatomic_cmpxchg((unsigned short *)addr,
+ old, old + val);
} while (oldt != old);
return old + val;
oldt = uatomic_read((unsigned int *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, old + val, 4);
+ oldt = uatomic_cmpxchg((unsigned int *)addr,
+ old, old + val);
} while (oldt != old);
return old + val;
oldt = uatomic_read((unsigned long *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, old + val, 8);
+ oldt = uatomic_cmpxchg((unsigned long *)addr,
+ old, old + val);
} while (oldt != old);
return old + val;
oldt = uatomic_read((unsigned char *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, val, 1);
+ oldt = uatomic_cmpxchg((unsigned char *)addr,
+ old, val);
} while (oldt != old);
return old;
oldt = uatomic_read((unsigned short *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, val, 2);
+ oldt = uatomic_cmpxchg((unsigned short *)addr,
+ old, val);
} while (oldt != old);
return old;
oldt = uatomic_read((unsigned int *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, val, 4);
+ oldt = uatomic_cmpxchg((unsigned int *)addr,
+ old, val);
} while (oldt != old);
return old;
oldt = uatomic_read((unsigned long *)addr);
do {
old = oldt;
- oldt = _uatomic_cmpxchg(addr, old, val, 8);
+ oldt = uatomic_cmpxchg((unsigned long *)addr,
+ old, val);
} while (oldt != old);
return old;