>From 256adc5ccd239288c3f38cd193072d6666ab1e82 Mon Sep 17 00:00:00 2001 From: Yubin Ruan <ablacktshirt@xxxxxxxxx> Date: Tue, 31 Oct 2017 11:12:03 +0800 Subject: [PATCH] memorder: Add one solution for one snippet Signed-off-by: Yubin Ruan <ablacktshirt@xxxxxxxxx> --- memorder/memorder.tex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/memorder/memorder.tex b/memorder/memorder.tex index f8886b4..a1c96df 100644 --- a/memorder/memorder.tex +++ b/memorder/memorder.tex @@ -3055,6 +3055,8 @@ surprise to \co{do_something()}.\footnote{ Tracking down the bug consumed a holiday weekend not just for your editor, but also for several of his colleagues. In short, this is not a new problem.} +In this case, \co{tmp} should be declared as \co{volatile} to prevent +the transformation by the compiler. Compilers can also fuse stores. The most infamous example is probably the progress-bar example -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html