News for hackers. Stuff that matters.
Re:Why volatile is hard to specify and implement by rdtsc on Monday April 11, 2016 @04:09PM (#11474695)
So you think wrapping every single access to that shared memory structure in barriers would do the trick? I should dig out that code and try, I am curious now. But that would be kind of an large change. Now the volatile modifier is in one place only -- where data is defined not when it is accessed.
Re:Why volatile is hard to specify and implement by Avernar on Monday April 11, 2016 @06:18PM (#11475611)
If you do it correctly it should work. I'm curious if that code is running on a multi core (or even hyperthreaded) CPU.