2009/3/26 Neil Jerram <n...@ossau.uklinux.net>: > > - and that scm_c_eval_string consists of reading (=> symbol lookup) > followed by evaluation (=> module obarray lookup), and that each > scm_c_eval_string call is fast enough to be completed well within one > time slice.
One way to stress test such situations is to call pthread_yield right after the unlock. i.e. temporarily change scm_i_pthread_mutex_unlock to also called yield. This will trigger a thread switch even if the time-slice is not expired, and can often expose these kinds of bugs. --linas