-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add some tests for shared mutex corner cases #118710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
e21c666
0f3d05b
36702b7
fc6340b
ffc63e4
11fe6dc
f660e85
562c970
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Runtime.InteropServices; | ||
| using System.Threading; | ||
|
|
||
| internal static partial class Interop | ||
| { | ||
| internal static partial class Sys | ||
| { | ||
| private static volatile int s_pageSize; | ||
|
|
||
| internal static int PageSize | ||
jkoritzinsky marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| get | ||
| { | ||
| int size = s_pageSize; | ||
| if (size == 0) | ||
| { | ||
| Interlocked.CompareExchange(ref s_pageSize, GetPageSize(), 0); | ||
| size = s_pageSize; | ||
| } | ||
|
|
||
| return size; | ||
| } | ||
| } | ||
|
|
||
| [LibraryImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetPageSize")] | ||
|
Check failure on line 28 in src/libraries/Common/src/Interop/Unix/Interop.GetPageSize.cs
|
||
| private static partial int GetPageSize(); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.