On Fri, Jul 1, 2011 at 5:37 PM, Fabrice Le Fessant
<[email protected]> 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

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to