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.

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: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T3ee8a81d5f09f2ec-Me9f5c4a72346d54fcfcd775f
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to