I am implementing some speed critical multithreaded code. I can avoid having some critical sections if I know for certain that some basic write operations are atomic. I just read an academic paper in which I saw the following:
"Writes of the basic types size t, int, float and pointer must be atomic. Writes by one thread must be seen by other threads in the same order. The IA-32 and Intel-64 CPU architectures, which are used in most modern standard computers, guarantee these assumptions."
What I would like to do is to be able to detect at run-time whether the processor is of a type in which these operations are atomic. - I'd like this to work for AMD processors too.