[cpp-threads] High-level vs. low-level
Peter Dimov
pdimov at mmltd.net
Thu Jul 13 21:11:43 BST 2006
Alexander Terekhov wrote:
> On 7/13/06, Peter Dimov <pdimov at mmltd.net> wrote:
>> int __atomic x;
>
> Uh. And why not simply atomic_int (could use std::atomic<int> under
> the cover a la <iohw.h> -> <hardware> from the TR, see Appendix C)?
Mainly because I want atomics that work on pointers:
int * px;
and structs:
struct { short a; short b; } x;
struct { void* a; void* b; } x2; // only if DWCAS supported
and unions:
union { char a[3]; int _for_alignment; } x;
More information about the cpp-threads
mailing list