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 CAA32354; Tue, 3 Jun 2003 02:32:21 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA32484 for ; Tue, 3 Jun 2003 02:32:19 +0200 (MET DST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id h530WIT15127 for ; Tue, 3 Jun 2003 02:32:18 +0200 (MET DST) Received: (qmail 34096 invoked from network); 3 Jun 2003 00:32:16 -0000 Received: from arda.pair.com (HELO checkerdell.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 3 Jun 2003 00:32:16 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030602165928.045cbc00@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Mon, 02 Jun 2003 17:05:16 -0700 To: Maas-Maarten Zeeman , Harry Chomsky From: Chris Hecker Subject: Re: [Caml-list] Question about register_global_root Cc: Damien Doligez , "Mary F. Fernandez" , caml-list@inria.fr, Jerome Simeon In-Reply-To: <3EDBAD39.2040901@wanadoo.nl> References: <004601c32923$0269fb00$0200a8c0@harry> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam: no; 0.00; hecker:01 checker:01 caml-list:01 alloc:01 camllocal:01 c-callable:01 runtime:01 ifdef:01 chris:01 suffix:03 docs:03 functions:05 equivalent:05 probably:05 handlers:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > signal_handlers = alloc(NSIG, 0); > register_global_root(&signal_handlers); >Is this also allowed? If signal_handlers is CAMLlocal (or equivalent). Although since register_global_root doesn't [currently] call the gc, it's probably okay as is, but why risk it? Perhaps all of the c-callable runtime functions should have a special prefix or suffix if they can cause a collection, and then the docs can be clear about what you can do before/after/between/whatever these specially marked calls. Of course, then you'd have to transition everybody to the new calls, which is a pain (or you could make it an #ifdef in the headers like STRICT on win32). Chris ------------------- 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