jaulib v1.3.0
Jau Support Library (C++, Java, ..)
|
test_mm_sc_drf_01: Testing SC-DRF non-atomic global read and write within a locked mutex critical block. More...
Public Member Functions | |
TestMemModelSCDRF01 () | |
void | test01_Read1Write1 () |
void | test02_Read2Write1 () |
void | test03_Read4Write1 () |
void | test11_Read10Write10 () |
void | test12_Read10Write10 () |
void | test_list () |
test_mm_sc_drf_01: Testing SC-DRF non-atomic global read and write within a locked mutex critical block.
Modified non-atomic memory within the locked mutex acquire and release block, must be visible for all threads according to memory model (MM) Sequentially Consistent (SC) being data-race-free (DRF).
See Herb Sutter's 2013-12-23 slides p19, first box "It must be impossible for the assertion to fail – wouldn’t be SC.".
See 'test_mm_sc_drf_00' implementing same test using an atomic acquire/release critical block with spin-lock.
Definition at line 54 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 145 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 148 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 158 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 182 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 198 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 218 of file test_mm_sc_drf_01.cpp.
|
inline |
Definition at line 238 of file test_mm_sc_drf_01.cpp.