Memory barriers in userspace? (Linux, x86-64)

后端 未结 8 1789
无人及你
无人及你 2021-01-30 18:15

It is easy to set memory barriers on the kernel side: the macros mb, wmb, rmb, etc. are always in place thanks to the Linux kernel headers.

How to accomplish this on th

8条回答
  •  臣服心动
    2021-01-30 19:15

    The Qprof profiling library (nothing to do with Qt) also includes in its source code a library of atomic operations, including memory barriers. They work on many compilers and architectures. I'm using it on a project of mine.

    http://www.hpl.hp.com/research/linux/qprof/download.php4

提交回复
热议问题