From mboxrd@z Thu Jan 1 00:00:00 1970 From: Teemu Torma To: egcs@cygnus.com Subject: MT-safe exceptions? Date: Mon, 08 Sep 1997 06:55:00 -0000 Message-id: <199709081354.PAA14826@baht.labs.trema.com> X-SW-Source: 1997-09/msg00278.html Are there any plans to make C++ exceptions multi-thread safe? Now that there are maybe working exceptions, it would be nice to use them in multi-threaded programs. By looking the generated code, it does not look complicated task (at least for me, but on the other hand I have only vague idea what it does). The problem with current version (egcs-970907) is that it uses global variables, instead of thread specific ones. To make it work, 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. Since it would require special libgcc, maybe an option -mt={pthread,} that compile with needed flags (-D_REENTRANT in Solaris) and link with appropriate libraries. Teemu