Hallo Darryl, thanks a lot for your explanations. They match exactly what I was used to. But when working through the multithreading manual I got a little bit nervous about the explanations since what is written there about multiprocessors and relaxed memory order would have a serious effect on the code to write. There are two sources contradicting your/our/my concept:
1.) Multithreaded Programming Guide (Sept. 2008, Page 240) "programmers must be careful to use locks around all global or shared data." This is explained by store buffers of one processor that are not necessarily flushed and hence modified data not being visible to other processors (threads). 2.) The Sun MT-FAQ (95114-001) Does the C keyword "volatile" cause the store buffer to flush ? ... The answer: writing to a volatile-qualified type object does not cause a store buffer flush. This is exact the contrary to your explanation "When you declare a variable to be volatile it ensures that the compiler always loads that variable from memory and immediately stores it back to memory after any operation on it." Since conforming and portable code is very much an issue for our current project we were a little bit concerned. Perhaps things could be made a little bit clearer in the manuals (provided we are not too dumb to understand them at all). Thanks for your help! b.m. -- This message posted from opensolaris.org