sys, dll: convert memory barriers to interlocked operations

This commit is contained in:
Bill Zissimopoulos committed 2022-01-19 10:55:46 +00:00
1 parent 362b9ceb7c
commit 29251dc2be
10 files changed
+55 -64

No files matched your search

+1 -2
View File
@@ -1298,8 +1298,7 @@ static NTSTATUS Overwrite(FSP_FILE_SYSTEM *FileSystem,
MemfsFileNodeMapEnumerateFn, &Context);
for (Index = 0; Context.Count > Index; Index++)
{
LONG RefCount = Context.FileNodes[Index]->RefCount;
MemoryBarrier();
LONG RefCount = FspInterlockedLoad32((INT32 *)&Context.FileNodes[Index]->RefCount);
if (2 >= RefCount)
MemfsFileNodeMapRemove(Memfs->FileNodeMap, Context.FileNodes[Index]);
}