Hi, Cedric Cellier <[email protected]> writes:
> But finaly, thanks to libgc's debug message, I got it. > Actually, libgc overwrite pthread_create (and pthread_sigmask, > and a few more) to know when a new thread is started. > But this overloading is done "softly", ie. by a define in a > C header file. [...] > So, in conclusion : always include libguile.h in the compilation > units calling pthread functions. That’s not entirely true, see Section “Thread Support” at <http://www.hpl.hp.com/personal/Hans_Boehm/gc/gcdescr.html>: All implementations must intercept thread creation and a few other thread-specific calls to allow enumeration of threads and location of thread stacks. This is current accomplished with # define's in gc.h (really gc_pthread_redirects.h), or optionally by using ld's function call wrapping mechanism under Linux. Indeed, here’s what I have on GNU/Linux: $ objdump -T ~/soft/lib/libgc.so|grep pthread_create 000000000001ef80 g DF .text 000000000000028e Base GC_pthread_create 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_create What OS do you use? Thanks, Ludo’.
