Skip to content

Commit 5178963

Browse files
am11teo-tsirpanis
andauthored
Update src/libraries/Common/src/Interop/Unix/System.Native/Interop.MemfdCreate.cs
Co-authored-by: Theodore Tsirpanis <[email protected]>
1 parent afab6b8 commit 5178963

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libraries/Common/src/Interop/Unix/System.Native/Interop.MemfdCreate.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ internal static bool MemfdSupported
2121
{
2222
get
2323
{
24-
int result = Interlocked.CompareExchange(ref s_memfdSupported, -1, -1);
24+
int result = s_memfdSupported;
2525
if (result == -1)
2626
{
2727
result = MemfdSupportedImpl();
28-
Interlocked.Exchange(ref s_memfdSupported, result);
28+
s_memfdSupported = result;
2929
}
3030
return result == 1;
3131
}

0 commit comments

Comments
 (0)