例如 外设可能不定期 dma write 32位变量 var1 而在程序里xor eax, eaxxchg eax, var1必须这样获取和更新 var1,而总线上,内存只有读写2种命令所以我担心在执行 xchg半中央时 dma write产生了,这就会造成var1的某些位丢失....
全文
回复(4) 2004-08-07 14:58 来自版块 - 内核编程
表情
boly81你的担心是多余的 IA-32 processors provide a LOCK# signal that is asserted automatically during certain critical memory operations to lock the syst...(2004-08-11 18:03)
yebear再请问前面的几位大老: LOCK#信号是锁定总线的吗?我看Intel一个文档好像说这个信号是用在多CPU之间互拆的,跟锁定内存总线没什么关系啊。(2004-08-10 23:41)
boly81The LOCK prefix can be prepended only to the following instructions and only to those forms of the instructions where the destination opera...(2004-08-09 13:21)
wowocock用CMPXCHG,或CMPXCHG8B。。。。。 或者在指令前用LOCK锁定总线。。。。(2004-08-09 09:03)

返回顶部