LWN.net Logo

Advertisement

Our team patches and enhances the Linux kernel and promotes the adoption of Linux at Oracle. mark.wilkerson @oracle.com

Advertise here

Swap

Swap

Posted Apr 3, 2013 5:05 UTC (Wed) by Ben_P (subscriber, #74247)
In reply to: Swap by tialaramex
Parent article: A look at C++14: Papers Part 2

Atomic swaps on doubles (and floats) are made more tricky by the fact very often NaN != NaN.


(Log in to post comments)

Swap

Posted Apr 5, 2013 23:18 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

Can't you just treat them as integers of the same size for CAS?

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