unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Ivan Maidanski <ivmai@mail.ru>
Cc: bug-guile <bug-guile@gnu.org>, gc@linux.hpl.hp.com
Subject: Re: [Gc] further pthread foo
Date: Sun, 20 Mar 2011 00:34:30 +0100	[thread overview]
Message-ID: <m3sjuivg55.fsf@unquote.localdomain> (raw)
In-Reply-To: <E1Q13ei-0001TJ-00.ivmai-mail-ru@f78.mail.ru> (Ivan Maidanski's message of "Sun, 20 Mar 2011 00:25:52 +0300")

Hi Ivan,

On Sat 19 Mar 2011 22:25, Ivan Maidanski <ivmai@mail.ru> 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	other threads:[~2011-03-19 23:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 22:26 further pthread foo Andy Wingo
     [not found] ` <m339mkxdyh.fsf-CaTCM8lwFkgB9AHHLWeGtNQXobZC6xk2@public.gmane.org>
2011-03-19 21:25   ` Ivan Maidanski
2011-03-19 23:34     ` Andy Wingo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sjuivg55.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=bug-guile@gnu.org \
    --cc=gc@linux.hpl.hp.com \
    --cc=ivmai@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).