diff options
Diffstat (limited to 'tools/ocaml/libs/eventchn/xeneventchn.ml')
-rw-r--r-- | tools/ocaml/libs/eventchn/xeneventchn.ml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/ocaml/libs/eventchn/xeneventchn.ml b/tools/ocaml/libs/eventchn/xeneventchn.ml new file mode 100644 index 0000000000..79ad9b1e95 --- /dev/null +++ b/tools/ocaml/libs/eventchn/xeneventchn.ml @@ -0,0 +1,30 @@ +(* + * Copyright (C) 2006-2007 XenSource Ltd. + * Copyright (C) 2008 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 handle + +external init: unit -> handle = "stub_eventchn_init" +external fd: handle -> Unix.file_descr = "stub_eventchn_fd" +external notify: handle -> int -> unit = "stub_eventchn_notify" +external bind_interdomain: handle -> int -> int -> int = "stub_eventchn_bind_interdomain" +external bind_dom_exc_virq: handle -> int = "stub_eventchn_bind_dom_exc_virq" +external unbind: handle -> int -> unit = "stub_eventchn_unbind" +external pending: handle -> int = "stub_eventchn_pending" +external unmask: handle -> int -> unit = "stub_eventchn_unmask" + +let _ = Callback.register_exception "eventchn.error" (Error "register_callback") |