blob: a35743b3400108b45755583aded20aca5a20662f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
(*
* 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.
*)
(** Event channel bindings: see tools/libxc/xenctrl.h *)
exception Error of string
type handle
(** An initialised event channel interface. *)
type t
(** A local event channel. *)
val to_int: t -> int
val of_int: int -> t
val init: unit -> handle
(** Return an initialised event channel interface. On error it
will throw a Failure exception. *)
val fd: handle -> Unix.file_descr
(** Return a file descriptor suitable for Unix.select. When
the descriptor becomes readable, it is safe to call 'pending'.
On error it will throw a Failure exception. *)
val notify : handle -> t -> unit
(** Notify the given event channel. On error it will throw a
Failure exception. *)
val bind_interdomain : handle -> int -> int -> t
(** [bind_interdomain h domid remote_port] returns a local event
channel connected to domid:remote_port. On error it will
throw a Failure exception. *)
val bind_dom_exc_virq : handle -> t
(** Binds a local event channel to the VIRQ_DOM_EXC
(domain exception VIRQ). On error it will throw a Failure
exception. *)
val unbind : handle -> t -> unit
(** Unbinds the given event channel. On error it will throw a
Failure exception. *)
val pending : handle -> t
(** Returns the next event channel to become pending. On error it
will throw a Failure exception. *)
val unmask : handle -> t -> unit
(** Unmasks the given event channel. On error it will throw a
Failure exception. *)
|