package xenstore
Xenstore protocol in pure OCam
Install
dune-project
Dependency
github.com
Readme
Changelog
LGPL-2.1-only WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (2)
Authors
Maintainers
Sources
xenstore-2.4.0.tbz
sha256=11b63bb2a5a8bc487d36f36ecb195b2a2135aa13ab401cbc73da67505c08faa4
sha512=b921aa4265503677f4984007efee6865461a18031dc49583be040781307cc6cbfcd84bc11e9ebc0a23e9b0cf281bd94528c475624bc30471ad8ff70607e0732f
doc/src/xenstore/xs_handle.ml.html
Source file xs_handle.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
(* * Copyright (C) Citrix Systems Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation; version 2.1 only. with the special * exception on linking described in file LICENSE. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. *) module StringSet = Set.Make (struct type t = string let compare = compare end) type 'a t = { client : 'a ; tid : int32 (* transaction id in use (0 means no transaction) *) ; mutable accessed_paths : StringSet.t option (* paths read or written to *) ; mutable watched_paths : StringSet.t (* paths being watched *) } let make client = { client ; tid = 0l ; (* no transaction *) accessed_paths = None ; (* not recording accesses *) watched_paths = StringSet.empty (* no paths watched *) } let get_tid h = h.tid let get_client h = h.client let no_transaction client = make client let transaction client tid = { (make client) with tid } let watching client = { (make client) with accessed_paths = Some StringSet.empty } let accessed_path h path = match h.accessed_paths with | None -> h | Some ps -> h.accessed_paths <- Some (StringSet.add path ps); h let get_accessed_paths h = match h.accessed_paths with None -> StringSet.empty | Some xs -> xs let watch h path = h.watched_paths <- StringSet.add path h.watched_paths; h let unwatch h path = h.watched_paths <- StringSet.remove path h.watched_paths; h let get_watched_paths h = h.watched_paths
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>