English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] caml_callback_depth : byterun + vmthreads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-18 (02:48)
From: Jonathan Roewen <jonathan.roewen@g...>
Subject: [Caml-list] caml_callback_depth : byterun + vmthreads

I found this bit of code in vmthreads/scheduler.c:

/* Don't allow preemption during a callback */
if (callback_depth > 1) return curr_thread->retval;

I've done some grepping, and I can find one instance of
[caml_]callback_depth++ (as far as I can tell, this is done once
only), and two instances of [caml_]callback_depth--. These are both in
byterun/interp.c. No where else is this value modified that I can
find, which has got me baffled.

It is the check above that is killing my OS (it never schedules
another thread). This also happens randomly.

Can some one please explain what the hell is going on?