Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

This program is modified from example in
https://preshing.com/20120515/memory-reordering-caught-in-the-act/.

This program is an experiment on memory order, where there should allow
only one thread enter the
 
if(__atomic_load_n(&Y,__ATOMIC_RELAXED) != __atomic_load_n(&X,__ATOMIC_RELAXED))

statement. 

However, according to the result of the experiment, if I don't apply the StoreLoad barrier, the r1 and r2 could both be one.

About

A experiment of memory order

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages