diff options
author | Stefano Stabellini <sstabellini@xensource.com> | 2010-08-10 15:32:12 +0100 |
---|---|---|
committer | Stefano Stabellini <sstabellini@xensource.com> | 2010-08-10 15:32:12 +0100 |
commit | 2386f0ac18d599b25607d03246a7754067f86e77 (patch) | |
tree | 0f486f75599e7e08b4110ecee086efc14cca185a | |
parent | 52be445541a145b45445dc3eb03c2b3b8e1df4f4 (diff) | |
download | xen-2386f0ac18d599b25607d03246a7754067f86e77.tar.gz xen-2386f0ac18d599b25607d03246a7754067f86e77.tar.bz2 xen-2386f0ac18d599b25607d03246a7754067f86e77.zip |
always drop the caml lock during any xl operations
Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
-rw-r--r-- | 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 8134e8eb5f..2f8401d517 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) |