> On Oct 9, 2019, at 11:41 AM, Garrett D'Amore <garr...@damore.org> wrote:
> 
> I don't think 32-bit compilers generally offer builtins for 64-bit atomics.  
> Frankly, they can't really unless the underlying ISA provides some additional 
> support for this in particular.

Yes, that is why the builtins exist... the underlying ISA may have a method 
that is not part of the C language.

Worst case, mutex protection will work... slowly.
 -- richard

> 
> To implement a 64-bit atomic on a 32-bit architecture, you generally needs 
> some additional state somewhere -- typically some sort of mutex or spinlock.  
> That has to live somewhere.  (You *might* be able to have a compiler builtin 
> that provides this along with a compiler runtime which provides an instance 
> of the spinlock somewhere in the program's data section.  I think this sort 
> of "builtin" (which isn't really builtin at all) generally can't be used in 
> operating system kernels -- e.g. with --freestanding.)
>> On 10/9/2019 11:26:40 AM, Richard Elling <richard.ell...@richardelling.com> 
>> wrote:
>> 
>> If it is possible to specify a compiler version, it might be easier to use 
>> the compiler
>> builtin atomics. Just sayin'
>> -- richard
>> 
> 
> openzfs <https://openzfs.topicbox.com/latest> / openzfs-developer / see 
> discussions <https://openzfs.topicbox.com/groups/developer> + participants 
> <https://openzfs.topicbox.com/groups/developer/members> + delivery options 
> <https://openzfs.topicbox.com/groups/developer/subscription>Permalink 
> <https://openzfs.topicbox.com/groups/developer/T3ee8a81d5f09f2ec-Me9f5c4a72346d54fcfcd775f>

------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T3ee8a81d5f09f2ec-M0e1652fa334ab713cd3c6235
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to