sys, dll: convert memory barriers to interlocked operations

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

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]);
}