This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
This should fix the handlers for platforms without __atomic_exchange for pointers by using a mutex. I used the old __mutex type not std::mutex because it's available on more platforms and works for the 'single' thread model too. I didn't try to optimise away the atomic ops for accessing the handlers because throwing exceptions and getting/setting these handlers should not be on the fast path of performance sensitive code. PR libstdc++/56841 * libsupc++/eh_ptr.cc (rethrow_exception): Use get_unexpected() and get_terminate() accessors. * libsupc++/eh_throw.cc (__cxa_throw): Likewise. * libsupc++/eh_terminate.cc: Use mutex when atomic builtins not available. * libsupc++/new_handler.cc: Likewise. Tested x86_64-linux and hppa2.0-linux, committed to trunk.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |