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

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

    The include/arch/qatomic_*.h headers of a recent Qt distribution include (LGPL) code for a lot of architectures and all kinds of memory barriers (acquire, release, both).

提交回复
热议问题