emacs-devel
[Top][All Lists]
Advanced

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

Re: advice needed for multi-threading patch


From: Tom Tromey
Subject: Re: advice needed for multi-threading patch
Date: Thu, 24 Sep 2009 11:57:28 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:

Tom> Yeah.  What I meant here is that specbind has a little extra code in it
Tom> to install a Lisp_ThreadLocal object when needed.  So, if the C code
Tom> uses specbind to do let-like binding, everything will work fine.  If the
Tom> C code does not do this, then things will break.

Stefan> I see, yes of course it's a problem.  And it's worse than that: the same
Stefan> holds for *all* global variables, whether they are exported to Lisp
Stefan> or not.

Yes.  We move a bunch of globals into a "struct thread_state" -- specpdl
stuff, gcprolist, catchlist, etc.  I haven't yet done an audit of
globals to see whether we caught them all.  These are also redefined
using the preprocessor, e.g.:

  /* Recording what needs to be marked for gc.  */
  struct gcpro *m_gcprolist;
#define gcprolist (current_thread->m_gcprolist)

Stefan> Some goals could be:
[...]

Thanks.  That is very helpful.

I will think about your other points and reply later.

Tom




reply via email to

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