Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9663131

Browse files
authored
Fix a PAL spin lock issue (#19606)
Fixes https://github.com/dotnet/coreclr/issues/18486 - Lock release needs to be at least volatile
1 parent c22824c commit 9663131

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pal/src/synchobj/mutex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ void SPINLOCKAcquire (LONG * lock, unsigned int flags)
804804

805805
void SPINLOCKRelease (LONG * lock)
806806
{
807-
*lock = 0;
807+
VolatileStore(lock, 0);
808808
}
809809

810810
DWORD SPINLOCKTryAcquire (LONG * lock)

0 commit comments

Comments
 (0)