[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] always drop the caml lock during any xl operations



# HG changeset patch
# User Stefano Stabellini <sstabellini@xxxxxxxxxxxxx>
# Date 1281450732 -3600
# Node ID 2ae7433fa5f2d42dd992fad8e29e80a0947c0ba2
# Parent  4ca72970c246accf648953b5d0d3be7515305b1b
always drop the caml lock during any xl operations

Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/ocaml/libs/xl/xl_stubs.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r 4ca72970c246 -r 2ae7433fa5f2 tools/ocaml/libs/xl/xl_stubs.c
--- a/tools/ocaml/libs/xl/xl_stubs.c    Tue Aug 10 15:31:55 2010 +0100
+++ b/tools/ocaml/libs/xl/xl_stubs.c    Tue Aug 10 15:32:12 2010 +0100
@@ -58,12 +58,14 @@ void log_destroy(struct xentoollog_logge
        lg.logger.vmessage = log_vmessage; \
        lg.logger.destroy = log_destroy; \
        lg.logger.progress = NULL; \
+       caml_enter_blocking_section(); \
        ret = libxl_ctx_init(&ctx, LIBXL_VERSION, (struct xentoollog_logger *) 
&lg); \
        if (ret != 0) \
                failwith_xl("cannot init context", &lg);
 
 #define FREE_CTX()  \
        gc_free(&gc); \
+       caml_leave_blocking_section(); \
        libxl_ctx_free(&ctx)
 
 static void * gc_calloc(caml_gc *gc, size_t nmemb, size_t size)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.