From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p61Ej5nb007697 for ; Fri, 1 Jul 2011 16:45:05 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnICAPLcDU7RVdg2kGdsb2JhbAA8AQMSp1sIFAEBAQEJCQ0HFAQhiHmid4wkgkuEQTmIaAIDBoYsBIc4inqMHjyDXA X-IronPort-AV: E=Sophos;i="4.65,458,1304287200"; d="scan'208";a="86436706" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 01 Jul 2011 16:44:59 +0200 Received: by qwc9 with SMTP id 9so2859284qwc.27 for ; Fri, 01 Jul 2011 07:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fQLO2FTOSyqDAPwT/VoMK3dJWRO0BAC8fkwLOy74Zs0=; b=gU2Dk8JhqvpETjomjKruU0d0J6rxyMGlYkNbnx92ERqCY6PJBkkVdKFfXHxOs/Vqpf lMYRj67jdw4ix6pOa5P/jSYQ+xQFUImUoENyR5tDOgr+x1BoWRy4aAMMkGDnPEVe/aML ob9elL25pobdO+/BSzUXsTGgFc01BOC0i/Kbo= MIME-Version: 1.0 Received: by 10.229.61.102 with SMTP id s38mr2560131qch.198.1309531498313; Fri, 01 Jul 2011 07:44:58 -0700 (PDT) Received: by 10.229.249.206 with HTTP; Fri, 1 Jul 2011 07:44:58 -0700 (PDT) In-Reply-To: <4E0DCD7C.5010907@inria.fr> References: <4E0DB5DE.8090309@inria.fr> <4E0DCD7C.5010907@inria.fr> Date: Fri, 1 Jul 2011 18:44:58 +0400 Message-ID: From: Dmitry Bely To: Fabrice Le Fessant Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] GC interface question On Fri, Jul 1, 2011 at 5:37 PM, Fabrice Le Fessant wrote: > Initialization to 0 for _varg is OK, of course. > > What does camlidl_acquire_runtime do ? I couldn't find it in camlidl > sources. Yes, that's my modification. Original camlidl is not thread-safe. Basically camlidl_acquire_runtime does caml_c_thread_register and caml_leave_blocking_section. camlidl_release_runtime points to caml_enter_blocking_section. > Is it possible it could trigger some garbage collection ? AFAIK, caml_leave_blocking_section() cannot trigger GC (while caml_enter_blocking_section can). > Is the field this->caml_object protected from a GC move during > camlidl_acquire_runtime() ? Yes, by caml_register_global_root. Returning to my question: value _varg[2] = { 0, 0, }; Is such initialization with zero normal? - Dmitry Bely