[cfe-dev] atomic intrinsics

John McCall rjmccall at apple.com
Tue Oct 5 17:57:52 PDT 2010


On Oct 5, 2010, at 4:23 PM, Howard Hinnant wrote:
> I actually did think about doing this by size, but decided the __atomic_* API was easier for me if I did it by type.  I agree that size is probably what the compiler writer is more concerned about.

For what it's worth, an implementation based on size would be very likely to automatically work for address-space qualified pointers, which are clearly foremost on everyone's mind. :)

More relevantly, it would avoid the need for seven different intrinsics to support int, unsigned int, long, unsigned long, char32_t, wchar_t, and void* in the common case where these are exactly the same operation.

John.



More information about the cfe-dev mailing list