I read the "Intel Optimization guide Guide For Intel Architecture".

However, I still have no idea about when should I use

_mm_sfence()
_mm_lfence()
_mm_mfence()

Could anyone explain when these should be used when writing multi-threaded code?

Edit
Report