Skip to content
Snippets Groups Projects
Commit 18f784ad authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Don't leak that locks are used internally in channels.

parent 41042d04
No related branches found
No related tags found
No related merge requests found
Pipeline #105272 passed
...@@ -68,8 +68,8 @@ Definition recv : val := ...@@ -68,8 +68,8 @@ Definition recv : val :=
(** * Setup of Iris's cameras *) (** * Setup of Iris's cameras *)
Class chanG Σ := { Class chanG Σ := {
chanG_lockG :: lockG Σ; #[local] chanG_lockG :: lockG Σ;
chanG_protoG :: protoG Σ val; #[local] chanG_protoG :: protoG Σ val;
}. }.
Definition chanΣ : gFunctors := #[ spin_lockΣ; protoΣ val ]. Definition chanΣ : gFunctors := #[ spin_lockΣ; protoΣ val ].
Global Instance subG_chanΣ {Σ} : subG chanΣ Σ chanG Σ. Global Instance subG_chanΣ {Σ} : subG chanΣ Σ chanG Σ.
......
...@@ -129,7 +129,7 @@ Section example. ...@@ -129,7 +129,7 @@ Section example.
"v2") "v2")
). ).
Lemma lock_example_spec jcc rcc c (x1 y1 : Z) : Lemma lock_example_spec `{!lockG Σ} jcc rcc c (x1 y1 : Z) :
{{{ c pizza_prot jcc #x1 rcc #y1 }}} {{{ c pizza_prot jcc #x1 rcc #y1 }}}
lock_example #jcc #rcc c lock_example #jcc #rcc c
{{{ (x2 y2 : Z), RET ((#x2, #(x1 - x2)), (#y2, #(y1 - y2)))%V; {{{ (x2 y2 : Z), RET ((#x2, #(x1 - x2)), (#y2, #(y1 - y2)))%V;
......
...@@ -35,7 +35,7 @@ Definition prog : val := λ: "c", ...@@ -35,7 +35,7 @@ Definition prog : val := λ: "c",
). ).
Section double. Section double.
Context `{heapGS Σ, chanG Σ, spawnG Σ}. Context `{!heapGS Σ, !chanG Σ, !spawnG Σ, !lockG Σ}.
Context `{!inG Σ fracR}. Context `{!inG Σ fracR}.
Definition prog_prot : iProto Σ := Definition prog_prot : iProto Σ :=
...@@ -119,7 +119,7 @@ Section double. ...@@ -119,7 +119,7 @@ Section double.
End double. End double.
Section double_fc. Section double_fc.
Context `{heapGS Σ, chanG Σ, spawnG Σ}. Context `{!heapGS Σ, !chanG Σ, !spawnG Σ, !lockG Σ}.
Context `{!inG Σ (exclR unitO), inG Σ (prodR fracR (agreeR (optionO valO)))}. Context `{!inG Σ (exclR unitO), inG Σ (prodR fracR (agreeR (optionO valO)))}.
Definition prog_prot_fc (P : val val iProp Σ) : iProto Σ := Definition prog_prot_fc (P : val val iProp Σ) : iProto Σ :=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment