Optimization/clarity coding : what is gcc able to do for me ?
Paul Brook
paul@codesourcery.com
Mon Jan 17 17:46:00 GMT 2005
On Monday 17 January 2005 16:59, Joe Buck wrote:
> It's up to you as a programmer to implement locking if you want to access
> any variable longer than a "sig_atomic_t" (which is a typedef that defines
> an integral type for which accesses are guaranteed to be atomic on your
> system; it is often "int", but might not be).
We don't guarantee atomic operation for smaller types either.
For example on some arm targets "int" is atomic, but "short" is not.
Paul
More information about the Gcc
mailing list