equal
deleted
inserted
replaced
39 jlong compare_value; |
39 jlong compare_value; |
40 jlong exchange_value; |
40 jlong exchange_value; |
41 do { |
41 do { |
42 compare_value = *dest; |
42 compare_value = *dest; |
43 exchange_value = compare_value + value; |
43 exchange_value = compare_value + value; |
44 } while (Atomic::cmpxchg(exchange_value, dest, compare_value) != compare_value); |
44 } while (Atomic::cmpxchg(dest, compare_value, exchange_value) != compare_value); |
45 return exchange_value; |
45 return exchange_value; |
46 } |
46 } |
47 |
47 |
48 // debug statistics |
48 // debug statistics |
49 static volatile jlong _allocated_bytes = 0; |
49 static volatile jlong _allocated_bytes = 0; |