Hi there,
I have two threads, which share data by thread A writing to a global variable and thread B reading from it. It works fine when I build "Debug" or "Release" with -o1. But thread B is not able to get the updated data if I build "Release" with the -o2 option. Any suggestion?
PS.: the global variable is declared as volatile. I have also tried to disable the L1D cache and L2 cache, didn't help.
BR
C.J.