From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Hanquez Subject: [PATCH 5/5] always drop the caml lock during any xl operations. Date: Tue, 10 Aug 2010 16:12:44 +0100 Message-ID: <1281453164-29013-6-git-send-email-vincent.hanquez@eu.citrix.com> References: <1281453164-29013-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1281453164-29013-1-git-send-email-vincent.hanquez@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel Cc: Vincent Hanquez List-Id: xen-devel@lists.xenproject.org Signed-off-by: Vincent Hanquez --- 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