]> xenbits.xensource.com Git - xen.git/commitdiff
tools: ocaml: rename the physinfo types and functions
authorDavid Scott <dave.scott@eu.citrix.com>
Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)
committerDavid Scott <dave.scott@eu.citrix.com>
Wed, 30 Mar 2011 17:54:28 +0000 (18:54 +0100)
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>
tools/ocaml/libs/xl/xl.ml
tools/ocaml/libs/xl/xl.mli

index a2a39e014404383553183f7c68692cbdf202dfe1..3e2244d1d2c484a3df6470e2783f3fd7407a6cdd 100644 (file)
@@ -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"
 
index d02328940423c419219fc347640ef37d07596700..c1332c9d731a2247e33ffa06fcf9ecf31e4a5575 100644 (file)
@@ -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"