On 07/01/2011 04:45 PM, Dmitry Bely wrote:
>> Initialization to 0 for _varg is OK, of course.

Is it the reply to your former question ?

> 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.

If I understand your code, you release the master lock on the GC, and
then you call camlidl_alloc_small(). Shouldn't you hold the master lock
while allocating ?

Fabrice

-- 
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

<<attachment: fabrice_le_fessant.vcf>>

Reply via email to