raz / conform / err / AtomicPointer.raz

12 lines · 197 B · raw · history · last change 4402a682

1(* An atomic takes the variable, not a pointer to it (report 6.8). *)
2module AtomicPointer;
3import SYSTEM;
4
5var n: INT;
6
7proc main*;
8begin
9 _ := XADD(SYSTEM.ADR(n), 1);
10end;
11
12end AtomicPointer.