[cfe-commits] patch: libcxxabi cxa_*_virtual and cxa_guard_* methods

Howard Hinnant hhinnant at apple.com
Tue May 24 16:09:21 PDT 2011


On May 24, 2011, at 6:13 PM, Howard Hinnant wrote:

> Committed based on Nick's patch revision 132009.  I ended up doing an __APPLE__ branch for the guard variable because of the desire to check for deadlock.  The non-Apple branch is pretty generic, and will hang on deadlock.  Other branches can be made of course (e.g. linux).
> 
> The problem with checking for deadlock is you need a cheap thread id that will fit in 56 bits, and that isn't portable.  Somewhere in this thread, someone mentioned how to do it, and that would be a welcome patch.
> 
> We've had an Apple expert on memory visibility look over the Apple branch and he's signed off on it. Though if anyone sees any problems with either branch, please speak up.  I've tested both branches fairly heavily (in addition to the tests that Nick wrote and are committed).  I didn't commit these extra tests because I wrote them using C++11 and libc++ (where it is so easy to create and manipulate threads).
> 
> Arm is not addressed herein, and patches that do so are of course welcome.
> 
> Finally, thanks Nick for getting this started!

I forgot to thank Dave Zarzycki for his generous and tremendously expert help on this.  Thanks Dave!

Howard




More information about the cfe-commits mailing list