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

后端 未结 8 1785
无人及你
无人及你 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:10

    Linux x64 means you can use the Intel memory barrier instructions. You might wrap them in macros similar to those in the Linux headers, if those macros aren't appropriate or accessible to your code

提交回复
热议问题