You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* switch to managed thread ID in Lock
* fattening the lock
* __declspec(selectany)
* few tweaks
* fairness
* more room for thread ids
* remove CurrentNativeThreadId
* couple fixes
* fix win-arm64 build
* win-arm64 build , another try
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* fix after renaming
* do not report successful spin if thread has waited
* keep extern and undo mangling of tls_CurrentThread in asm
* use SyncTable indexer in less perf-sensitive places.
* GetNewHashCode just delegate to shared random
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* unchecked const conversion
* some refactoring comments and typos
* min number of spins in the backoff
* moved CurrentManagedThreadIdUnchecked to ManagedThreadId
* Use `-1` to report success and allow using element #1 in the SyncTable
* use threadstatic for managed thread ID
* check before calling RhGetProcessCpuCount
* use 0 as default thread ID
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Copy file name to clipboardExpand all lines: src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/SynchronizedMethodHelpers.cs
+32-6Lines changed: 32 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -14,42 +14,68 @@ internal static class SynchronizedMethodHelpers
Copy file name to clipboardExpand all lines: src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeHelpers.NativeAot.cs
+4-9Lines changed: 4 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -94,17 +94,9 @@ public static object GetObjectValue(object? obj)
0 commit comments