aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/xenstored/domains.ml
diff options
context:
space:
mode:
authorJon Ludlam <jonathan.ludlam@eu.citrix.com>2011-10-10 16:37:07 +0100
committerJon Ludlam <jonathan.ludlam@eu.citrix.com>2011-10-10 16:37:07 +0100
commit7ceaa0c7449e841d7ca7db889c3041dc3fedbb3b (patch)
tree5a31c840895e59e1ef01f4d08cc1354506559f1e /tools/ocaml/xenstored/domains.ml
parentdf0c75a05f6782a88e0471a9c5e070f8900a875f (diff)
downloadxen-7ceaa0c7449e841d7ca7db889c3041dc3fedbb3b.tar.gz
xen-7ceaa0c7449e841d7ca7db889c3041dc3fedbb3b.tar.bz2
xen-7ceaa0c7449e841d7ca7db889c3041dc3fedbb3b.zip
tools/ocaml: Rename the ocaml libraries
ocamlfind does not support namespaces, so to avoid name clashes the module names have become longer. Additionally, the xenstore and xenbus subdirs, which contain several modules each, have been packed into toplevel Xenstore and Xenbus modules. xb becomes xenbus, xc becomes xenctrl, xl becomes xenlight, xs becomes xenstore, eventchn becomes xeneventchn and mmap becomes xenmmap. [ Patch modified from that submitted, to update the .hgignore, and to cope with intervening changes to mmap_stubs.c -iwj ] Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/ocaml/xenstored/domains.ml')
-rw-r--r--tools/ocaml/xenstored/domains.ml20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/ocaml/xenstored/domains.ml b/tools/ocaml/xenstored/domains.ml
index 54d50d8ec0..9fca17ff84 100644
--- a/tools/ocaml/xenstored/domains.ml
+++ b/tools/ocaml/xenstored/domains.ml
@@ -16,7 +16,7 @@
type domains = {
eventchn: Event.t;
- table: (Xc.domid, Domain.t) Hashtbl.t;
+ table: (Xenctrl.domid, Domain.t) Hashtbl.t;
}
let init eventchn =
@@ -33,16 +33,16 @@ let cleanup xc doms =
Hashtbl.iter (fun id _ -> if id <> 0 then
try
- let info = Xc.domain_getinfo xc id in
- if info.Xc.shutdown || info.Xc.dying then (
+ let info = Xenctrl.domain_getinfo xc id in
+ if info.Xenctrl.shutdown || info.Xenctrl.dying then (
Logs.debug "general" "Domain %u died (dying=%b, shutdown %b -- code %d)"
- id info.Xc.dying info.Xc.shutdown info.Xc.shutdown_code;
- if info.Xc.dying then
+ id info.Xenctrl.dying info.Xenctrl.shutdown info.Xenctrl.shutdown_code;
+ if info.Xenctrl.dying then
dead_dom := id :: !dead_dom
else
notify := true;
)
- with Xc.Error _ ->
+ with Xenctrl.Error _ ->
Logs.debug "general" "Domain %u died -- no domain info" id;
dead_dom := id :: !dead_dom;
) doms.table;
@@ -57,7 +57,7 @@ let resume doms domid =
()
let create xc doms domid mfn port =
- let interface = Xc.map_foreign_range xc domid (Mmap.getpagesize()) mfn in
+ let interface = Xenctrl.map_foreign_range xc domid (Xenmmap.getpagesize()) mfn in
let dom = Domain.make domid mfn port interface doms.eventchn in
Hashtbl.add doms.table domid dom;
Domain.bind_interdomain dom;
@@ -66,13 +66,13 @@ let create xc doms domid mfn port =
let create0 fake doms =
let port, interface =
if fake then (
- 0, Xc.with_intf (fun xc -> Xc.map_foreign_range xc 0 (Mmap.getpagesize()) 0n)
+ 0, Xenctrl.with_intf (fun xc -> Xenctrl.map_foreign_range xc 0 (Xenmmap.getpagesize()) 0n)
) else (
let port = Utils.read_file_single_integer Define.xenstored_proc_port
and fd = Unix.openfile Define.xenstored_proc_kva
[ Unix.O_RDWR ] 0o600 in
- let interface = Mmap.mmap fd Mmap.RDWR Mmap.SHARED
- (Mmap.getpagesize()) 0 in
+ let interface = Xenmmap.mmap fd Xenmmap.RDWR Xenmmap.SHARED
+ (Xenmmap.getpagesize()) 0 in
Unix.close fd;
port, interface
)