[cpp-threads] Should atomic_add support pointers?

Peter Dimov pdimov at mmltd.net
Fri Nov 4 22:08:04 GMT 2005


I'm trying to nail down the semantics of an atomic ops library and I 
encountered the following interesting issue:

Should atomic_add support pointer addition? That is:

int * p;

atomic_add( &p, 4 ); // allowed? sensible?

What do you think?

--
Peter Dimov
http://www.pdimov.com 




More information about the cpp-threads mailing list