Skip to content
Snippets Groups Projects
Commit d7d27fb7 authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan
Browse files

Cancellable invariants are not need for lock.

parent 21a5a9ee
No related branches found
No related tags found
No related merge requests found
Pipeline #
From iris.program_logic Require Import weakestpre.
From iris.base_logic.lib Require Import cancelable_invariants.
From iris.proofmode Require Import tactics.
From iris.algebra Require Import excl.
From lrust.lang Require Import lang proofmode notation.
......@@ -14,14 +13,14 @@ Definition release : val := λ: ["l"], "l" <-ˢᶜ #false.
(** The CMRA we need. *)
(* Not bundling heapG, as it may be shared with other users. *)
Class lockG Σ := LockG { lock_tokG :> inG Σ (exclR unitC); lock_cinvG :> cinvG Σ }.
Definition lockΣ : gFunctors := #[GFunctor (exclR unitC); cinvΣ].
Class lockG Σ := LockG { lock_tokG :> inG Σ (exclR unitC) }.
Definition lockΣ : gFunctors := #[GFunctor (exclR unitC)].
Instance subG_lockΣ {Σ} : subG lockΣ Σ lockG Σ.
Proof. solve_inG. Qed.
Section proof.
Context `{!lrustG Σ, !lockG Σ} (N : namespace).
Context `{!lrustG Σ, !lockG Σ}.
Definition lock_proto (γ : gname) (l : loc) (R : iProp Σ) : iProp Σ :=
( b : bool, l #b if b then True else own γ (Excl ()) R)%I.
......
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