edits
[cdsspec-compiler.git] / output / concurrent-hashmap / note.txt
1 #Non-SC:
2 The following case can be non-SC.
3
4 Thrd1                                           Thrd2
5 put(k1, v1); // a                       put(k2, v2); // c
6 get(k2); // b                           get(k1); // d
7
8 When b and d both read the old head of the list (and they later grab the lock,
9 making it the interface SC), it's non-SC because neither reads the updated
10 value.
11
12 Run testcase1 to make the store and load of value slot to be seq_cst.
13
14 Then run testcase2 with "-o annotation" to get store and load of key slot to be
15 release/acquire.
16
17 0m0.015s + 0m0.000 = 0m0.015s