1(* 2 * Copyright (C) 2006-2007 XenSource Ltd. 3 * Copyright (C) 2008 Citrix Ltd. 4 * Author Vincent Hanquez <vincent.hanquez@eu.citrix.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as published 8 * by the Free Software Foundation; version 2.1 only. with the special 9 * exception on linking described in file LICENSE. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Lesser General Public License for more details. 15 *) 16 17(**************** high level binding ****************) 18type t = { 19 handle: Xeneventchn.handle; 20 mutable virq_port: Xeneventchn.t option; 21} 22 23let init () = { handle = Xeneventchn.init (); virq_port = None; } 24let fd eventchn = Xeneventchn.fd eventchn.handle 25let bind_dom_exc_virq eventchn = eventchn.virq_port <- Some (Xeneventchn.bind_dom_exc_virq eventchn.handle) 26let bind_interdomain eventchn domid port = Xeneventchn.bind_interdomain eventchn.handle domid port 27let unbind eventchn port = Xeneventchn.unbind eventchn.handle port 28let notify eventchn port = Xeneventchn.notify eventchn.handle port 29let pending eventchn = Xeneventchn.pending eventchn.handle 30let unmask eventchn port = Xeneventchn.unmask eventchn.handle port 31