Skip to content

Commit

Permalink
Update src/libraries/Common/src/Interop/Unix/System.Native/Interop.Me…
Browse files Browse the repository at this point in the history
…mfdCreate.cs

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
  • Loading branch information
am11 and teo-tsirpanis authored Jul 20, 2024
1 parent afab6b8 commit 5178963
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ internal static bool MemfdSupported
{
get
{
int result = Interlocked.CompareExchange(ref s_memfdSupported, -1, -1);
int result = s_memfdSupported;
if (result == -1)
{
result = MemfdSupportedImpl();
Interlocked.Exchange(ref s_memfdSupported, result);
s_memfdSupported = result;
}
return result == 1;
}
Expand Down

0 comments on commit 5178963

Please sign in to comment.