LWN.net Logo

32 bit systems?

32 bit systems?

Posted Sep 6, 2013 18:33 UTC (Fri) by simlo (subscriber, #10866)
Parent article: Introducing lockrefs

Is cmpxchg 64 bit atomic on those?


(Log in to post comments)

32 bit systems?

Posted Sep 6, 2013 21:37 UTC (Fri) by marcH (subscriber, #57642) [Link]

I'd better be...

Shorter version of the article: atomic hardware operations are not limited to 32 bits any more.

32 bit systems?

Posted Sep 7, 2013 16:15 UTC (Sat) by peter-b (subscriber, #66996) [Link]

I use 128-bit CAS (CMPXCHG16B on x86-64) in some of my software, specifically for implementing double-pointer CAS as part of a wait-free disjoint set algorithm.

32 bit systems?

Posted Sep 12, 2013 13:12 UTC (Thu) by farnz (guest, #17727) [Link]

On x86, CMPXCHG8B is 8 bytes (64-bits), and is present since the Pentium (it's the instruction involved in the F0 0F bug). On other platforms, LL/SC can usually be used to emulate a double-pointer compare and swap.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds