Go to the source code of this file.
Defines | |
#define | ret_t long |
#define | ret32_t int |
#define | ret64_t long long |
#define | rc_ret_t ret32_t |
#define | CAS32(addr, expval, newval) cas32((int *)(addr),(int)(expval),(int)(newval)) |
#define | CAS64(addr, expval, newval) cas64((long long *)(addr),(long long)(expval),(long long)(newval)) |
#define | CAS(addr, expval, newval) CAS32(addr,expval,newval) |
#define | FAA(oldval, addr, val) |
#define CAS | ( | addr, | |||
expval, | |||||
newval | ) | CAS32(addr,expval,newval) |
#define CAS32 | ( | addr, | |||
expval, | |||||
newval | ) | cas32((int *)(addr),(int)(expval),(int)(newval)) |
#define CAS64 | ( | addr, | |||
expval, | |||||
newval | ) | cas64((long long *)(addr),(long long)(expval),(long long)(newval)) |
#define FAA | ( | oldval, | |||
addr, | |||||
val | ) |
Value:
do { \ long newval; \ oldval = *(addr); \ newval = oldval + val; \ int ret = CAS(addr,oldval,newval); \ if (ret) break; \ } while (1);
#define rc_ret_t ret32_t |
#define ret32_t int |
#define ret64_t long long |
#define ret_t long |