bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gc] further pthread foo


From: Andy Wingo
Subject: Re: [Gc] further pthread foo
Date: Sun, 20 Mar 2011 00:34:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Ivan,

On Sat 19 Mar 2011 22:25, Ivan Maidanski <address@hidden> writes:

> Try to compile libgc with -DGC_ASSERTIONS but without
> -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK.

OK, will do.  Thanks for the suggestion, and sorry for the burden.  You
must get the worst bugs!

> BTW. Why do you use GC_call_with_gc_active()? It should be no-op in your
> case - the thread is stopped and scanned after you call
> GC_register_my_thread. (GC_call_with_gc_active is used primarily inside
> GC_do_blocking calls).

We have scm_with_guile and scm_without_guile, which invoke a procedure
in and out of Guile mode.  scm_with_guile nests as you would think it
would, and scm_without_guile can only be called in Guile mode.

If a thread is not in Guile mode, it shouldn't be active for GC purposes
-- shouldn't be in the thread set to stop -- so it goes through a
do_blocking.  scm_with_guile therefore goes through a
GC_call_with_gc_active, even in the case that it's not in the extent of
a GC_do_blocking context call.

So yes, it's a no-op, and harmles in this case.

Regards,

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]