How to make use of CMPXCHG16B?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm trying to figure out how to make use of CMPXCHG16B.  The GCC
manual looks to point towards __sync_val_compare_and_swap() with
__int128 data types and the -mcx16 compile flag.  But this data type
is not present when I try to compile with it, nor do I think my 4th
generation Opteron is capable of holding __int128 values in its
registers.  So what's the equivalent of .Net's
_InterlockedCompareExchange128()
[http://msdn.microsoft.com/en-us/library/bb514094.aspx] in GCC-land?
I'm trying to avoid having to (re?)implement it myself as these folks
did:

http://stackoverflow.com/questions/4825400/cmpxchg16b-correct

Thanks for any guidance,

--Borg Onion


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux