cmpswap.c - vx32 - Local 9vx git repository for patches. | |
git clone git://r-36.net/vx32 | |
Log | |
Files | |
Refs | |
--- cmpswap.c (160B) --- 1 int oscmpswap(long* addr, long oldval, long newval) 2 { 3 int res; 4 res = __sync_bool_compare_and_swap(addr, oldval, newval); 5 if (res) 6 return 1; 7 return 0; 8 } 9 |