aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml
diff options
context:
space:
mode:
authorDavid Scott <dave.scott@eu.citrix.com>2011-03-30 18:54:28 +0100
committerDavid Scott <dave.scott@eu.citrix.com>2011-03-30 18:54:28 +0100
commit56e0b06e36cedd178d7c3d9a94e1d24d269ce869 (patch)
tree3391046a10bba1634373a2f079fb660f099c1687 /tools/ocaml
parentea153d70c95d9cf6b54d768232d9c596fd47d581 (diff)
downloadxen-56e0b06e36cedd178d7c3d9a94e1d24d269ce869.tar.gz
xen-56e0b06e36cedd178d7c3d9a94e1d24d269ce869.tar.bz2
xen-56e0b06e36cedd178d7c3d9a94e1d24d269ce869.zip
tools: ocaml: rename the physinfo types and functions
The aims are: 1. make the records instantiable if they have field names in common; and 2. to make it easier to derive the names programatically from the IDL Signed-off-by: David Scott <dave.scott@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/ocaml')
-rw-r--r--tools/ocaml/libs/xl/xl.ml33
-rw-r--r--tools/ocaml/libs/xl/xl.mli33
2 files changed, 36 insertions, 30 deletions
diff --git a/tools/ocaml/libs/xl/xl.ml b/tools/ocaml/libs/xl/xl.ml
index a2a39e0144..3e2244d1d2 100644
--- a/tools/ocaml/libs/xl/xl.ml
+++ b/tools/ocaml/libs/xl/xl.ml
@@ -192,20 +192,24 @@ module Device_pci = struct
external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"
end
-type physinfo =
-{
- threads_per_core: int;
- cores_per_socket: int;
- max_cpu_id: int;
- nr_cpus: int;
- cpu_khz: int;
- total_pages: int64;
- free_pages: int64;
- scrub_pages: int64;
- nr_nodes: int;
- hwcap: int32 array;
- physcap: int32;
-}
+module Physinfo = struct
+ type t =
+ {
+ threads_per_core: int;
+ cores_per_socket: int;
+ max_cpu_id: int;
+ nr_cpus: int;
+ cpu_khz: int;
+ total_pages: int64;
+ free_pages: int64;
+ scrub_pages: int64;
+ nr_nodes: int;
+ hwcap: int32 array;
+ physcap: int32;
+ }
+ external get : unit -> t = "stub_xl_physinfo"
+
+end
type topology =
{
@@ -227,7 +231,6 @@ type button =
| Button_Sleep
external button_press : domid -> button -> unit = "stub_xl_button_press"
-external physinfo : unit -> physinfo = "stub_xl_physinfo"
external topologyinfo: unit -> topologyinfo = "stub_xl_topologyinfo"
diff --git a/tools/ocaml/libs/xl/xl.mli b/tools/ocaml/libs/xl/xl.mli
index d023289404..c1332c9d73 100644
--- a/tools/ocaml/libs/xl/xl.mli
+++ b/tools/ocaml/libs/xl/xl.mli
@@ -192,20 +192,24 @@ module Device_pci : sig
external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"
end
-type physinfo =
-{
- threads_per_core: int;
- cores_per_socket: int;
- max_cpu_id: int;
- nr_cpus: int;
- cpu_khz: int;
- total_pages: int64;
- free_pages: int64;
- scrub_pages: int64;
- nr_nodes: int;
- hwcap: int32 array;
- physcap: int32;
-}
+module Physinfo : sig
+ type t =
+ {
+ threads_per_core: int;
+ cores_per_socket: int;
+ max_cpu_id: int;
+ nr_cpus: int;
+ cpu_khz: int;
+ total_pages: int64;
+ free_pages: int64;
+ scrub_pages: int64;
+ nr_nodes: int;
+ hwcap: int32 array;
+ physcap: int32;
+ }
+ external get : unit -> t = "stub_xl_physinfo"
+
+end
type topology =
{
@@ -227,7 +231,6 @@ type button =
| Button_Sleep
external button_press : domid -> button -> unit = "stub_xl_button_press"
-external physinfo : unit -> physinfo = "stub_xl_physinfo"
external topologyinfo: unit -> topologyinfo = "stub_xl_topologyinfo"