在用户空间记忆障碍是什么? (Linux操作系统,X86-64) [英] Memory barriers in userspace? (Linux, x86-64)
本文介绍了在用户空间记忆障碍是什么? (Linux操作系统,X86-64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是很容易设置的内核侧内存屏障:在感谢的Linux内核头文件的地方宏MB,WMB,人民币等,始终。
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.
如何在用户侧完成此
推荐答案
Posix的<一个href=\"http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd%5Fchap04.html#tag%5F04%5F10\">defines多项功能的是充当内存屏障。内存位置不能同时访问;以prevent这一点,使用同步 - 而同步也将作为一个屏障
Posix defines a number of functions as acting as memory barriers. Memory locations must not be concurrently accessed; to prevent this, use synchronization - and that synchronization will also work as a barrier.
这篇关于在用户空间记忆障碍是什么? (Linux操作系统,X86-64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文