From: Vincent Hanquez Subject: [PATCH 5/5] always drop the caml lock during any xl operations. Date: Tue, 10 Aug 2010 12:46:53 +0100 Message-ID: <1281440813-22610-6-git-send-email-vincent.hanquez@eu.citrix.com> References: <1281440813-22610-1-git-send-email-vincent.hanquez@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.7.1" Return-path: In-Reply-To: <1281440813-22610-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 --------------1.7.1 Content-Type: text/plain; charset="UTF-8"; format=fixed Content-Transfer-Encoding: quoted-printable Signed-off-by: Vincent Hanquez --- tools/ocaml/libs/xl/xl_stubs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) --------------1.7.1 Content-Type: text/x-patch; name="0005-always-drop-the-caml-lock-during-any-xl-operations.patch" Content-Disposition: attachment; filename="0005-always-drop-the-caml-lock-during-any-xl-operations.patch" Content-Transfer-Encoding: quoted-printable diff --git a/tools/ocaml/libs/xl/xl_stubs.c b/tools/ocaml/libs/xl/xl_stub= s.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 =3D log_vmessage; \ lg.logger.destroy =3D log_destroy; \ lg.logger.progress =3D NULL; \ + caml_enter_blocking_section(); \ ret =3D libxl_ctx_init(&ctx, LIBXL_VERSION, (struct xentoollog_logger *= ) &lg); \ if (ret !=3D 0) \ failwith_xl("cannot init context", &lg); =20 #define FREE_CTX() \ gc_free(&gc); \ + caml_leave_blocking_section(); \ libxl_ctx_free(&ctx) =20 static void * gc_calloc(caml_gc *gc, size_t nmemb, size_t size) --------------1.7.1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------1.7.1--