This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: MT-safe exceptions?
- To: egcs at cygnus dot com, tot at trema dot com
- Subject: Re: MT-safe exceptions?
- From: mrs at wrs dot com (Mike Stump)
- Date: Mon, 8 Sep 1997 11:20:45 -0700
> 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.