Menu

#97 32/64-bit atomics for any data type

open
nobody
5
2012-04-22
2012-04-22
Anonymous
No

Support atomics for any 32/64-bit data type. Of course, atomicity is guaranteed for top-level expression update only and does not extend to any global variable modified inside the function called.

Expressions shall be implemented by doing in-register value update + atomicCAS() in a loop. Sure, this requires the use of volatile pointers.

Standard atomic{} and atomic() syntax shall be used for such expressions.

Discussion