74_atomic_rmw_access.toy (194B)
1 fn __user_main(): i64 { 2 var x: i64 = 40; 3 let old: i64 = @atomic_rmw<i64>(.add, &x, 2, .seq_cst, access(.align(8))); 4 return x + old - 40; 5 } 6 7 fn main(): i32 { return __user_main() as i32; }
kitkit | |
| git clone https://git.ryansepassi.com/git/kit.git | |
| Log | Files | Refs | README |