a
This commit is contained in:
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Runtime.InteropServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace System.Threading
|
||||
{
|
||||
/// <summary>Provides a mutual exclusion lock primitive where a thread trying to acquire the lock waits in a loop repeatedly checking until the lock becomes available.</summary>
|
||||
// Token: 0x0200030F RID: 783
|
||||
[Token(Token = "0x200030F")]
|
||||
[DebuggerDisplay("IsHeld = {IsHeld}")]
|
||||
[ComVisible(false)]
|
||||
[DebuggerTypeProxy(typeof(SpinLock.SystemThreading_SpinLockDebugView))]
|
||||
public struct SpinLock
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Threading.SpinLock" /> structure with the option to track thread IDs to improve debugging.</summary>
|
||||
/// <param name="enableThreadOwnerTracking">Whether to capture and use thread IDs for debugging purposes.</param>
|
||||
// Token: 0x06001CF4 RID: 7412 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CF4")]
|
||||
[Address(RVA = "0x2927980", Offset = "0x2926780", VA = "0x182927980")]
|
||||
public SpinLock(bool enableThreadOwnerTracking)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Acquires the lock in a reliable manner, such that even if an exception occurs within the method call, <paramref name="lockTaken" /> can be examined reliably to determine whether the lock was acquired.</summary>
|
||||
/// <param name="lockTaken">True if the lock is acquired; otherwise, false. <paramref name="lockTaken" /> must be initialized to false prior to calling this method.</param>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="lockTaken" /> argument must be initialized to false prior to calling Enter.</exception>
|
||||
/// <exception cref="T:System.Threading.LockRecursionException">Thread ownership tracking is enabled, and the current thread has already acquired this lock.</exception>
|
||||
// Token: 0x06001CF5 RID: 7413 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CF5")]
|
||||
[Address(RVA = "0x29276C0", Offset = "0x29264C0", VA = "0x1829276C0")]
|
||||
public void Enter(ref bool lockTaken)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Attempts to acquire the lock in a reliable manner, such that even if an exception occurs within the method call, <paramref name="lockTaken" /> can be examined reliably to determine whether the lock was acquired.</summary>
|
||||
/// <param name="millisecondsTimeout">The number of milliseconds to wait, or <see cref="F:System.Threading.Timeout.Infinite" /> (-1) to wait indefinitely.</param>
|
||||
/// <param name="lockTaken">True if the lock is acquired; otherwise, false. <paramref name="lockTaken" /> must be initialized to false prior to calling this method.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="millisecondsTimeout" /> is a negative number other than -1, which represents an infinite time-out.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="lockTaken" /> argument must be initialized to false prior to calling TryEnter.</exception>
|
||||
/// <exception cref="T:System.Threading.LockRecursionException">Thread ownership tracking is enabled, and the current thread has already acquired this lock.</exception>
|
||||
// Token: 0x06001CF6 RID: 7414 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CF6")]
|
||||
[Address(RVA = "0x29278B0", Offset = "0x29266B0", VA = "0x1829278B0")]
|
||||
public void TryEnter(int millisecondsTimeout, ref bool lockTaken)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06001CF7 RID: 7415 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CF7")]
|
||||
[Address(RVA = "0x29271E0", Offset = "0x2925FE0", VA = "0x1829271E0")]
|
||||
private void ContinueTryEnter(int millisecondsTimeout, ref bool lockTaken)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06001CF8 RID: 7416 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CF8")]
|
||||
[Address(RVA = "0x29275B0", Offset = "0x29263B0", VA = "0x1829275B0")]
|
||||
private void DecrementWaiters()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06001CF9 RID: 7417 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CF9")]
|
||||
[Address(RVA = "0x2927000", Offset = "0x2925E00", VA = "0x182927000")]
|
||||
private void ContinueTryEnterWithThreadTracking(int millisecondsTimeout, uint startTime, ref bool lockTaken)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Releases the lock.</summary>
|
||||
/// <param name="useMemoryBarrier">A Boolean value that indicates whether a memory fence should be issued in order to immediately publish the exit operation to other threads.</param>
|
||||
/// <exception cref="T:System.Threading.SynchronizationLockException">Thread ownership tracking is enabled, and the current thread is not the owner of this lock.</exception>
|
||||
// Token: 0x06001CFA RID: 7418 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CFA")]
|
||||
[Address(RVA = "0x2927850", Offset = "0x2926650", VA = "0x182927850")]
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
public void Exit(bool useMemoryBarrier)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x06001CFB RID: 7419 RVA: 0x00002050 File Offset: 0x00000250
|
||||
[Token(Token = "0x6001CFB")]
|
||||
[Address(RVA = "0x2927740", Offset = "0x2926540", VA = "0x182927740")]
|
||||
private void ExitSlowPath(bool useMemoryBarrier)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets whether the lock is held by the current thread.</summary>
|
||||
/// <returns>true if the lock is held by the current thread; otherwise false.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">Thread ownership tracking is disabled.</exception>
|
||||
// Token: 0x170003E7 RID: 999
|
||||
// (get) Token: 0x06001CFC RID: 7420 RVA: 0x00012C48 File Offset: 0x00010E48
|
||||
[Token(Token = "0x170003E7")]
|
||||
public bool IsHeldByCurrentThread
|
||||
{
|
||||
[Token(Token = "0x6001CFC")]
|
||||
[Address(RVA = "0x29279C0", Offset = "0x29267C0", VA = "0x1829279C0")]
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
get
|
||||
{
|
||||
return default(bool);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets whether thread ownership tracking is enabled for this instance.</summary>
|
||||
/// <returns>true if thread ownership tracking is enabled for this instance; otherwise false.</returns>
|
||||
// Token: 0x170003E8 RID: 1000
|
||||
// (get) Token: 0x06001CFD RID: 7421 RVA: 0x00012C60 File Offset: 0x00010E60
|
||||
[Token(Token = "0x170003E8")]
|
||||
public bool IsThreadOwnerTrackingEnabled
|
||||
{
|
||||
[Token(Token = "0x6001CFD")]
|
||||
[Address(RVA = "0x2927A70", Offset = "0x2926870", VA = "0x182927A70")]
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
||||
get
|
||||
{
|
||||
return default(bool);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0400109F RID: 4255
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
||||
[Token(Token = "0x400109F")]
|
||||
private int m_owner;
|
||||
|
||||
// Token: 0x040010A0 RID: 4256
|
||||
[Token(Token = "0x40010A0")]
|
||||
private static int MAXIMUM_WAITERS;
|
||||
|
||||
// Token: 0x02000310 RID: 784
|
||||
[Token(Token = "0x2000310")]
|
||||
internal class SystemThreading_SpinLockDebugView
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user