This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MT-safe exceptions?


> From: Teemu Torma <tot@trema.com>
> To: egcs@cygnus.com
> Date: Mon, 08 Sep 1997 15:54:54 +0200

> Are there any plans to make C++ exceptions multi-thread safe?

Yes.  I will be doing this work in the coming months if no one beats
me to it.

> By looking the generated code, it does not look complicated task

No, not very complicated.  If someone wanted to try their hand at it,
I would be happy to help them out, just let me know.  Interface
changing in the compiler, reorganizing data into a structure, passing
a pointer to that structure around at runtime...

> I think the only major thing is to put all the variables into a
> structure, and call a routine in libgcc to get one, and possibly
> only once in each subroutine, not multiple times like now
> __get_dynamic_handler_chain gets called.

Right, that is an obvious optimization.  There are many such
optimizations.  The trick to to spend time on the ones that win the
most.

> Since it would require special libgcc,

Don't think of it as a special libgcc.  It will be the normal one,
it's just that the normal one might need some more support code in it
for EH.

> maybe an option -mt={pthread,<other target specific flavor>} that
> compile with needed flags (-D_REENTRANT in Solaris) and link with
> appropriate libraries.

Yes, this is yet another aspect of work that needs doing.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]