xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
To: Xen Devel <xen-devel@lists.xensource.com>
Cc: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Subject: [PATCH 1/3] register the ocaml exception so it can be used at the C level.
Date: Tue, 13 Jul 2010 14:51:11 +0100	[thread overview]
Message-ID: <1279029073-28530-2-git-send-email-vincent.hanquez@eu.citrix.com> (raw)
In-Reply-To: <1279029073-28530-1-git-send-email-vincent.hanquez@eu.citrix.com>

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]


Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
---
 tools/ocaml/libs/xl/xl.ml  |    4 ++++
 tools/ocaml/libs/xl/xl.mli |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-register-the-ocaml-exception-so-it-can-be-used-at-th.patch --]
[-- Type: text/x-patch; name="0001-register-the-ocaml-exception-so-it-can-be-used-at-th.patch", Size: 1060 bytes --]

diff --git a/tools/ocaml/libs/xl/xl.ml b/tools/ocaml/libs/xl/xl.ml
index 0f665ae..1e3642f 100644
--- a/tools/ocaml/libs/xl/xl.ml
+++ b/tools/ocaml/libs/xl/xl.ml
@@ -13,6 +13,8 @@
  * GNU Lesser General Public License for more details.
  *)
 
+exception Error of string
+
 type create_info =
 {
 	hvm : bool;
@@ -207,3 +209,5 @@ external domain_sched_credit_set : domid -> sched_credit -> unit = "stub_xl_sche
 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")
diff --git a/tools/ocaml/libs/xl/xl.mli b/tools/ocaml/libs/xl/xl.mli
index 0f665ae..4193e59 100644
--- a/tools/ocaml/libs/xl/xl.mli
+++ b/tools/ocaml/libs/xl/xl.mli
@@ -13,6 +13,8 @@
  * GNU Lesser General Public License for more details.
  *)
 
+exception Error of string
+
 type create_info =
 {
 	hvm : bool;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2010-07-13 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 13:51 [PATCH 0/3] update for xl bindings Vincent Hanquez
2010-07-13 13:51 ` Vincent Hanquez [this message]
2010-07-13 13:51 ` [PATCH 2/3] add a simple logger to the ocaml bindings Vincent Hanquez
2010-07-13 13:51 ` [PATCH 3/3] Properly adjust fields in ocaml structure to match the C layer Vincent Hanquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279029073-28530-2-git-send-email-vincent.hanquez@eu.citrix.com \
    --to=vincent.hanquez@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).