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

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

    __sync_synchronize() in GCC 4.4+

    The Intel Memory Ordering White Paper, a section from Volume 3A of Intel 64 and IA-32 manual http://developer.intel.com/Assets/PDF/manual/253668.pdf

提交回复
热议问题