barrier.v 234 Bytes
Newer Older
1
From iris.heap_lang Require Export notation.
2

3
4
Definition newbarrier : val := λ: <>, ref §0.
Definition signal : val := λ: "x", '"x" <- §1.
5
Definition wait : val :=
6
  rec: "wait" "x" := if: !'"x" = §1 then §() else '"wait" '"x".