shared(int) val; atomic_fetch_add_impl(&val, 3); assert(atomic_load_impl(&val) == 3);
See Implementation