From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Hoes Subject: libxl: ocaml: improve the bindings Date: Thu, 13 Jun 2013 16:24:42 +0100 Message-ID: <1371137112-16692-1-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is version 2 of this patch series to fix the OCaml binding to libxl. I believe I have addressed all the points raised by Dave Scott and Ian Campbell. Sorry for the delay in getting this new series out! The main changes are: * Several fixes to ensure the bindings play well with the OCaml GC. This includes properly using macros such as CAMLparam* and CAMLreturn* for _all_ OCaml values (even intermediate ones), and using "custom" blocks to encapsulate pointers to C code (including handy "finalize" functions for cleanup. * Fixes in the way KeyedUnions are handled. * Use the libxl init function to generate default records for libxl types. * Improve the functions that deal with event handling. We now have some higher-level functions to makes this easier as well as safer, and errors are translated properly. --------- The following series of patches fill in most of the gaps in the OCaml bindings to libxl, to make them useful for clients such as xapi/xenopsd (from XCP). There are a number of bugfixes to the existing bindings as well. I have an experimental version of xenopsd that successfully uses the new bindings. An earlier version of the first half of the series was submitted to the last by Ian Campbell on 20 Nov 2012. With his permission, I have updated most of them to fix some issues (which were discussed on the mailing list at the time). I have left Ian's signed-off-by line on those patches (please let me know if that is not appropriate). For convenience, the patches in this series may be pulled using: git pull git://github.com/robhoes/xen.git hydrogen-upstream-v2 Cheers, Rob