diff options
Diffstat (limited to 'tools/ocaml/libs/mmap/xenmmap.mli')
-rw-r--r-- | tools/ocaml/libs/mmap/xenmmap.mli | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/ocaml/libs/mmap/xenmmap.mli b/tools/ocaml/libs/mmap/xenmmap.mli new file mode 100644 index 0000000000..8f92ed6310 --- /dev/null +++ b/tools/ocaml/libs/mmap/xenmmap.mli @@ -0,0 +1,28 @@ +(* + * 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. + *) + +type mmap_interface +type mmap_prot_flag = RDONLY | WRONLY | RDWR +type mmap_map_flag = SHARED | PRIVATE + +external mmap : Unix.file_descr -> mmap_prot_flag -> mmap_map_flag -> int -> int + -> mmap_interface = "stub_mmap_init" +external unmap : mmap_interface -> unit = "stub_mmap_final" +external read : mmap_interface -> int -> int -> string = "stub_mmap_read" +external write : mmap_interface -> string -> int -> int -> unit + = "stub_mmap_write" + +external getpagesize : unit -> int = "stub_mmap_getpagesize" |