From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 42CBCBBAF for ; Sat, 9 Jan 2010 20:36:20 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am0BAHppSEtV2gB4mWdsb2JhbACDXpd7AQEBAQEICwoHE6tVjEmBK4IuVgSJJg X-IronPort-AV: E=Sophos;i="4.49,248,1262559600"; d="scan'208";a="44532381" Received: from emailfrontal1.citycable.ch ([85.218.0.120]) by mail1-smtp-roc.national.inria.fr with SMTP; 09 Jan 2010 20:36:19 +0100 Received: from [192.168.0.12] (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal1.citycable.ch (Postfix) with ESMTPA id 8635512C262; Sat, 9 Jan 2010 20:36:18 +0100 (CET) Message-ID: <4B48DAA7.3070400@citycable.ch> Date: Sat, 09 Jan 2010 20:36:07 +0100 From: Guillaume Yziquel Reply-To: guillaume.yziquel@citycable.ch User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= Cc: caml-list List Subject: Re: [Caml-list] problem creating .cma library References: <56670.41.177.16.252.1262195331.squirrel@41.177.16.252> <4B3BE288.4030701@citycable.ch> <3EE07409-9559-4B91-BA3E-8787D1378275@inria.fr> <4B47C201.7090201@citycable.ch> <4B47C59C.9080505@starynkevitch.net> <4B47C9BE.4060309@citycable.ch> <001f01ca9101$7ee76850$7cb638f0$@romulus.metastack.com> <4B486974.7060007@citycable.ch> <20100109125224.GC26610@annexia.org> <91a3da521001090600y2a456e3dg98200cd84d8bf082@mail.gmail.com> In-Reply-To: <91a3da521001090600y2a456e3dg98200cd84d8bf082@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; guillaume:01 guillaume:01 ocaml's:01 runtime:01 multithreads:01 ocaml:01 sexp:01 val:01 sexp:01 readable:01 caml-list:01 caml-list:01 functions:01 cma:01 caml:02 Daniel B=C3=BCnzli a =C3=A9crit : > Section 2) of this paper also has a very gentle and readable > introduction to the gc : >=20 > http://portal.acm.org/citation.cfm?id=3D141130 Thanks for the link. > Another thing you need to know, if you have long running pieces of C > code that don't interact with ocaml's runtime system, is the two > functions : >=20 > caml_enter_blocking_section > caml_leave_blocking_section >=20 > They are explained in this message : >=20 > http://caml.inria.fr/pub/ml-archives/caml-list/2001/06/58d7a7e8747056c3= 842e53b4e9454f44.en.html OK. So if I want to call R code that multithreads with OCaml, I should write=20 something like > enter_blocking_section(); > PROTECT(e =3D R_tryEval(Sexp_val(sexp_list), R_GlobalEnv, &error)); > UNPROTECT(1); > leave_blocking_section(); Am I correct? --=20 Guillaume Yziquel http://yziquel.homelinux.org/