Linus Torvalds writes: (Summary)
Does it?
Does it?
Can't we simplify the whole sequence as basically
Can't we simplify the whole sequence as basically
A
Does it?
Can't we simplify the whole sequence as basically
Can't we simplify the whole sequence as basically
A
if (!B) D for that "not B" case, and just think about that. Now, the *compiler* can use the whole existence of that memory barrier in C to determine whether it can re-order the write to D or not, of course, but that's a separate issue, and then the whole "code that isn't executed" is not the issue any more.