WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 5/5] always drop the caml lock during any xl operatio

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 5/5] always drop the caml lock during any xl operations.
From: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Date: Tue, 10 Aug 2010 16:12:44 +0100
Cc: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Delivery-date: Tue, 10 Aug 2010 08:20:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1281453164-29013-1-git-send-email-vincent.hanquez@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1281453164-29013-1-git-send-email-vincent.hanquez@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/ocaml/libs/xl/xl_stubs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/ocaml/libs/xl/xl_stubs.c b/tools/ocaml/libs/xl/xl_stubs.c
index 8134e8e..2f8401d 100644
--- a/tools/ocaml/libs/xl/xl_stubs.c
+++ b/tools/ocaml/libs/xl/xl_stubs.c
@@ -58,12 +58,14 @@ void log_destroy(struct xentoollog_logger *logger)
        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)
-- 
1.7.1


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