Commit adc0a095 authored by Robbert Krebbers's avatar Robbert Krebbers

Make `lock` instances canonical structures.

parent 48892aba
Pipeline #5714 passed with stages
in 6 minutes and 18 seconds
......@@ -36,7 +36,7 @@ Section proof.
Global Instance lock_inv_ne γ l : NonExpansive (lock_inv γ l).
Proof. solve_proper. Qed.
Global Instance is_lock_ne l : NonExpansive (is_lock γ l).
Global Instance is_lock_ne γ l : NonExpansive (is_lock γ l).
Proof. solve_proper. Qed.
(** The main proofs. *)
......@@ -90,6 +90,6 @@ End proof.
Typeclasses Opaque is_lock locked.
Definition spin_lock `{!heapG Σ, !lockG Σ} : lock Σ :=
Canonical Structure spin_lock `{!heapG Σ, !lockG Σ} : lock Σ :=
{| lock.locked_exclusive := locked_exclusive; lock.newlock_spec := newlock_spec;
lock.acquire_spec := acquire_spec; lock.release_spec := release_spec |}.
......@@ -166,6 +166,6 @@ End proof.
Typeclasses Opaque is_lock issued locked.
Definition ticket_lock `{!heapG Σ, !tlockG Σ} : lock Σ :=
Canonical Structure ticket_lock `{!heapG Σ, !tlockG Σ} : lock Σ :=
{| lock.locked_exclusive := locked_exclusive; lock.newlock_spec := newlock_spec;
lock.acquire_spec := acquire_spec; lock.release_spec := release_spec |}.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment