There seems to be an implicit assumption in this code that writes which one thread makes will be seen by other threads in the same order.
There seems to be an implicit assumption in this code that writes which one thread makes will be seen by other threads in the same order. This is not the case on modern architectures. You need both compiler and machine-level memory barriers to ensure this. C's "volatile" keyword does not provide either. The Linux kernel guys wrote an in-depth explanation of why volatile doesn't work for this use-case here: https://www.kernel.org/doc/Documentation/volatile-considered...
Posted by colin_mccabe on May 5, 2014, 12:30 AM
Tags
Related issues
- > Because they don't believe the disasters were inflicted by them.
- Hehe, yeah I'm not sure when John Stewart would have worked there or what the pain points were for him, but he worked there for a bit.
- https://www.apple.com/shop/product/mxcl3ll/a/magic-keyboard-...
- If first-order hybrids made up only a small proportion of the total population of humans and Neanderthals, then the probability that a pa...
- Well, I'd be interested to hear what some of those nuances are, personally.
- My biggest Amazon annoyance.
Raise real-world problems, find people facing the same issue, and discuss solutions.9,500 issues0 comments
hackernews (E-commerce)
> Because they don't believe the disasters were inflicted by them.
Hehe, yeah I'm not sure when John Stewart would have worked there or what the pain points were for him, but he worked there for a bit.
https://www.apple.com/shop/product/mxcl3ll/a/magic-keyboard-...
If first-order hybrids made up only a small proportion of the total population of humans and Neanderthals, then the probability that a pa...
Well, I'd be interested to hear what some of those nuances are, personally.
My biggest Amazon annoyance.
> There's not really an unmet need for innovation in broadband delivery; the issue is running new wires broadband has costs, and in a lot...
Speaking of Amazon's account process, I have a really annoying problem with theirs.
There seems to be an implicit assumption in this code that writes which one thread makes will be seen by other threads in the same order.
There seems to be an implicit assumption in this code that writes which one thread makes will be seen by other threads in the same order. This is not the case on modern architectures. You need both compiler and machine-level memory barriers to ensure this. C's "volatile" keyword does not provide either. The Linux kernel guys wrote an in-depth explanation of why volatile doesn't work for this use-case here: https://www.kernel.org/doc/Documentation/volatile-considered...
Comments (0)
No comments yet. Start the discussion.