From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA17058; Fri, 18 Apr 2003 10:41:48 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA17011 for ; Fri, 18 Apr 2003 10:41:46 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from smtp12.cp.tin.it ([212.216.176.206]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h3I8fiX02678 for ; Fri, 18 Apr 2003 10:41:45 +0200 (MET DST) Received: from dalamar.takhisis.org (80.180.77.218) by smtp12.cp.tin.it (6.7.016) id 3E8423B10068FA6D for caml-list@inria.fr; Fri, 18 Apr 2003 10:41:43 +0200 Received: from lordsoth.takhisis.org (lordsoth.takhisis.org [192.168.1.119]) by dalamar.takhisis.org (Postfix) with ESMTP id C0946B7A9 for ; Fri, 18 Apr 2003 10:41:36 +0200 (CEST) Received: by lordsoth.takhisis.org (Postfix, from userid 3148) id F402A7070; Fri, 18 Apr 2003 10:41:35 +0200 (CEST) Date: Fri, 18 Apr 2003 10:41:35 +0200 From: Stefano Zacchiroli To: Inria Ocaml Mailing List Subject: Re: [Caml-list] OCaml signal handlers (Sys.signal) and C code Message-ID: <20030418084135.GA7689@lordsoth.takhisis.org> Mail-Followup-To: Inria Ocaml Mailing List References: <20030404165616.GA17379@lordsoth.takhisis.org> <20030416211607.B30839@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030416211607.B30839@pauillac.inria.fr> User-Agent: Mutt/1.5.4i X-Spam: no; 0.00; bononia:01 caml-list:01 invocation:01 callbacks:01 ocaml:01 caml:01 blocking:01 0200,:01 conversions:02 bologna:03 heap:03 wrote:03 zacchiroli:03 romney:03 sys:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Apr 16, 2003 at 09:16:07PM +0200, Xavier Leroy wrote: > honored immediately. However, the C code executed inside the blocking > section *must not* heap-allocate nor access the Caml heap in any way. > In practice, this means that all conversions between Caml and C data > structures must be done outside the blocking section: Your "in any way" include also read only access (e.g. "Field" invocation on a caml value allocated outside the blocking section), right? If this is the case I'm a bit concerned about performances. I have a piece of C code, invoked by OCaml, that access caml values inside a loop. To convert this code so that it can be interrupted by ocaml callbacks I have to enter blocking before each access and exit afterwards. Is this entering/existing time consuming? Thanks, Cheers. -- Stefano Zacchiroli -- Master in Computer Science @ Uni. Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} - http://www.bononia.it/zack/ " I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant! " -- G.Romney ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners