[cfe-dev] atomic intrinsics

John McCall rjmccall at apple.com
Sat Oct 16 09:23:25 PDT 2010


On Oct 16, 2010, at 6:21 AM, Sebastian Redl wrote:

> 
> On 16.10.2010, at 03:05, John McCall wrote:
> 
>> On Oct 15, 2010, at 5:03 PM, Howard Hinnant wrote:
>>> Thanks for looking at this John.
>>> 
>>> On Oct 15, 2010, at 7:21 PM, John McCall wrote:
>>> 
>>>> On Oct 7, 2010, at 5:30 PM, Howard Hinnant wrote:
>>>>> I see what you mean.  I'll mention this in the design doc.  I believe it will be an issue for any design we choose (A, B, or C).
>>>> 
>>>> 
>>>> After some thought, I think I personally prefer proposal A, slightly modified such that __atomic_is_lock_free is a pseudofunction like __is_pod().
>>> 
>>> I see, like:
>>> 
>>> bool __atomic_is_lock_free(type);
>>> 
>>> ?
>> 
>> That's what I was thinking.
> 
> Is that sufficient? The library spec contains a per-object is_lock_free(), presumably so that it can return false for unaligned objects. Are we confident that all such cases can be resolved in the library, so that the only query to the compiler needs to be about the underlying type?

The library spec says it returns true/false consistently for all objects of that type.

John.



More information about the cfe-dev mailing list