
4 Aug
2010
4 Aug
'10
2:08 p.m.
Why would you need to worry about such a thing? That's the responsibility of the compiler/hardware. Rob Stewart
Are you sure the compiler would take care of this? I've worked on a number of different CPU's, including the SPARC and the RS/6000, and I've never seen any special assembly emitted by the compiler that would do that. I feel like there's still something missing from the picture. You see, normally, entering and exiting a lock takes care of the memory fencing issues for you, but constructors are naked. By that, I mean there doesn't appear to be a fence at the end of the constructor, and therefore I don't see how the current core informs all other cores that a block of memory has been modified. -Sid