From: Ian Campbell Date: Wed, 20 Apr 2011 16:13:07 +0000 (+0100) Subject: tools: ocaml: rename the topology types and functions X-Git-Tag: 4.2.0-rc1~2309 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=46e6fd499a6f55ed11d754e6c55b071ebfe2ff89;p=xen.git 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 Acked-by: Ian Jackson Committed-by: Ian Jackson Cc: David Scott --- 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"