提交 469aa8b9 创建 作者: Robert Morris's avatar Robert Morris

xx

上级 e85cb90c
...@@ -56,7 +56,7 @@ release(struct spinlock *lk) ...@@ -56,7 +56,7 @@ release(struct spinlock *lk)
// past this point, to ensure that all the stores in the critical // past this point, to ensure that all the stores in the critical
// section are visible to other cores before the lock is released. // section are visible to other cores before the lock is released.
// Both the C compiler and the hardware may re-order loads and // Both the C compiler and the hardware may re-order loads and
// stores; __sync_synchronize() tells them both to not re-order. // stores; __sync_synchronize() tells them both not to.
__sync_synchronize(); __sync_synchronize();
// Release the lock, equivalent to lk->locked = 0. // Release the lock, equivalent to lk->locked = 0.
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论