From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Scott Subject: Re: [PATCH 21/28] libxl: ocaml: add wrappers for poll Date: Tue, 23 Apr 2013 14:56:21 +0100 Message-ID: <51769305.2030607@eu.citrix.com> References: <1364222729-6982-1-git-send-email-rob.hoes@citrix.com> <1364222729-6982-22-git-send-email-rob.hoes@citrix.com> <1365683460.8036.93.camel@zakaz.uk.xensource.com> <7EA643C653F17F4C80DE959E978F10ED010F729E0192@LONPMAILBOX01.citrite.net> <1366724631.20256.151.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1366724631.20256.151.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Rob Hoes , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 23/04/13 14:43, Ian Campbell wrote: > (aside: I'd really love it if tools/ocaml/libs/mmap could find a non-Xen > home too ;-)) I think I can arrange that. In the mirage code we've settled on using OCaml 'bigarrays' [1] (wrappers around C arrays) to pass around buffers, represent memory pages etc. The OCaml standard library has the ability to mmap() stuff and return a bigarray but there was an unfortunate bug where it assumed the thing being mmap()ed also supported lseek() [2]. The bug was fixed in OCaml 4.00.0 so if we're happy to depend on that then we're ready to roll. Cheers, Dave [1] http://caml.inria.fr/pub/docs/manual-ocaml/libref/Bigarray.html [2] http://caml.inria.fr/mantis/print_bug_page.php?bug_id=5543