aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/libs/xl/xenlight.ml.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ocaml/libs/xl/xenlight.ml.in')
-rw-r--r--tools/ocaml/libs/xl/xenlight.ml.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/ocaml/libs/xl/xenlight.ml.in b/tools/ocaml/libs/xl/xenlight.ml.in
new file mode 100644
index 0000000000..f4bba86837
--- /dev/null
+++ b/tools/ocaml/libs/xl/xenlight.ml.in
@@ -0,0 +1,39 @@
+(*
+ * Copyright (C) 2009-2011 Citrix Ltd.
+ * Author Vincent Hanquez <vincent.hanquez@eu.citrix.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *)
+
+exception Error of string
+
+type domid = int
+
+(* @@LIBXL_TYPES@@ *)
+
+module Topologyinfo = struct
+ type t =
+ {
+ core : int;
+ socket : int;
+ node : int;
+ }
+ external get : unit -> t = "stub_xl_topologyinfo"
+end
+
+external button_press : domid -> button -> unit = "stub_xl_button_press"
+
+
+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"
+
+let _ = Callback.register_exception "xl.error" (Error "register_callback")