[cfe-dev] atomic intrinsics

Sebastian Redl sebastian.redl at getdesigned.at
Sat Oct 16 06:21:44 PDT 2010


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?

Sebastian



More information about the cfe-dev mailing list