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>
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 =
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"
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 =
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"