Adds to_add to *dest and returns the value *dest held before.
hits: s32 = 10;
before := atomic_add(*hits, 3);
assert(before == 10 && hits == 13);atomic_add :: (dest: *$T, to_add: $I) -> T
Parameters
- dest: *$T
- to_add: $I
Returns
- T
Adds to_add to *dest and returns the value *dest held before.
hits: s32 = 10;
before := atomic_add(*hits, 3);
assert(before == 10 && hits == 13);atomic_add :: (dest: *$T, to_add: $I) -> T