Can I force cache coherency on a multicore x86 CPU?

后端 未结 9 1125
一个人的身影
一个人的身影 2020-11-29 18:43

The other week, I wrote a little thread class and a one-way message pipe to allow communication between threads (two pipes per thread, obviously, for bidirectional communica

9条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 18:54

    Volatile won't do it. In C++, volatile only affects what compiler optimizations such as storing a variable in a register instead of memory, or removing it entirely.

提交回复
热议问题