Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Roqc/clib/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 658 B image not shown  

Quelle  mutex_aux_5.0.ml   Sprache: SML

 
(* backport of Mutex.protect from OCaml 5.1 *)
external unlock: Mutex.t -> unit = "caml_ml_mutex_unlock"

(* Critical sections :
   - Mutex.lock does not poll on leaving the blocking section
     since 4.12.
   - Never inline, to avoid theoretically-possible reorderings with
     flambda.
   - Inline the call to Mutex.unlock to avoid polling in bytecode.
     (workaround to the lack of masking) *)

let[@inline never] with_lock m ~scope =
  let () = Mutex.lock m (* BEGIN ATOMIC *) in
  match (* END ATOMIC *) scope () with
  | (* BEGIN ATOMIC *) x -> unlock m ; (* END ATOMIC *) x
  | (* BEGIN ATOMIC *) exception e -> unlock m ; (* END ATOMIC *) raise e

100%


¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.