diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-04-20 17:13:07 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2011-04-20 17:13:07 +0100 |
commit | 46e6fd499a6f55ed11d754e6c55b071ebfe2ff89 (patch) | |
tree | 97083bb8113a62e6ce717c2e9359dea02a84066c /tools/ocaml | |
parent | a411b4e61ad0ee43326e94859a33c320298fbd3f (diff) | |
download | xen-46e6fd499a6f55ed11d754e6c55b071ebfe2ff89.tar.gz xen-46e6fd499a6f55ed11d754e6c55b071ebfe2ff89.tar.bz2 xen-46e6fd499a6f55ed11d754e6c55b071ebfe2ff89.zip |
tools: ocaml: rename the topology 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: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Cc: David Scott <dave.scott@eu.citrix.com>
Diffstat (limited to 'tools/ocaml')
-rw-r--r-- | tools/ocaml/libs/xl/xl.ml | 18 | ||||
-rw-r--r-- | tools/ocaml/libs/xl/xl.mli | 19 |
2 files changed, 18 insertions, 19 deletions
diff --git a/tools/ocaml/libs/xl/xl.ml b/tools/ocaml/libs/xl/xl.ml index 3e5b2dee82..ff87a58a2d 100644 --- a/tools/ocaml/libs/xl/xl.ml +++ b/tools/ocaml/libs/xl/xl.ml @@ -211,14 +211,15 @@ module Physinfo = struct end -type topology = -{ - core: int; - socket: int; - node: int; -} - -type topologyinfo = topology option array +module Topologyinfo = struct + type t = + { + core: int; + socket: int; + node: int; + } + external get: unit -> t = "stub_xl_topologyinfo" +end module Sched_credit = struct type t = @@ -236,7 +237,6 @@ type button = external button_press : domid -> button -> unit = "stub_xl_button_press" -external topologyinfo: unit -> topologyinfo = "stub_xl_topologyinfo" external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger" external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq" diff --git a/tools/ocaml/libs/xl/xl.mli b/tools/ocaml/libs/xl/xl.mli index 2e2e177e53..09f9b787dd 100644 --- a/tools/ocaml/libs/xl/xl.mli +++ b/tools/ocaml/libs/xl/xl.mli @@ -211,14 +211,15 @@ module Physinfo : sig end -type topology = -{ - core: int; - socket: int; - node: int; -} - -type topologyinfo = topology option array +module Topologyinfo : sig + type t = + { + core: int; + socket: int; + node: int; + } + external get : unit -> t = "stub_xl_topologyinfo" +end module Sched_credit : sig type t = @@ -237,8 +238,6 @@ type button = external button_press : domid -> button -> unit = "stub_xl_button_press" -external topologyinfo: unit -> topologyinfo = "stub_xl_topologyinfo" - external send_trigger : domid -> string -> int -> unit = "stub_xl_send_trigger" external send_sysrq : domid -> char -> unit = "stub_xl_send_sysrq" external send_debug_keys : domid -> string -> unit = "stub_xl_send_debug_keys" |