From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez 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 Message-ID: <1279029073-28530-2-git-send-email-vincent.hanquez@eu.citrix.com> References: <1279029073-28530-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.7.1" Return-path: In-Reply-To: <1279029073-28530-1-git-send-email-vincent.hanquez@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel Cc: Vincent Hanquez List-Id: xen-devel@lists.xenproject.org --------------1.7.1 Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: quoted-printable Signed-off-by: Vincent Hanquez --- tools/ocaml/libs/xl/xl.ml | 4 ++++ tools/ocaml/libs/xl/xl.mli | 2 ++ 2 files changed, 6 insertions(+), 0 deletions(-) --------------1.7.1 Content-Type: text/x-patch; name="0001-register-the-ocaml-exception-so-it-can-be-used-at-th.patch" Content-Disposition: attachment; filename="0001-register-the-ocaml-exception-so-it-can-be-used-at-th.patch" Content-Transfer-Encoding: quoted-printable 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. *) =20 +exception Error of string + type create_info =3D { hvm : bool; @@ -207,3 +209,5 @@ external domain_sched_credit_set : domid -> sched_cre= dit -> unit =3D "stub_xl_sche external send_trigger : domid -> string -> int -> unit =3D "stub_xl_send= _trigger" external send_sysrq : domid -> char -> unit =3D "stub_xl_send_sysrq" external send_debug_keys : domid -> string -> unit =3D "stub_xl_send_deb= ug_keys" + +let _ =3D Callback.register_exception "xl.error" (Error "register_callba= ck") 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. *) =20 +exception Error of string + type create_info =3D { hvm : bool; --------------1.7.1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------1.7.1--