
2 Nov
2007
2 Nov
'07
4:20 p.m.
Anthony Williams:
Also, Howard pointed out that the C ABI for one of the Apple compilers doesn't handle C++ exceptions in a way that would allow cancellation implemented as a C++ exception to call pthread cleanup handlers in a C stack frame. Breaking the C ABI to support the C++ thread library isn't nice.
I believe that Solaris does manage to do a C++ friendly unwind without breaking its C ABI. It apparently does so by looking at the linked list created by pthread_cleanup_push and invoking the registered functions and the destructors in the proper order. I could be wrong though. The source code of the C++ friendly unwind doesn't seem to be available.