139 lines
6.6 KiB
C#
139 lines
6.6 KiB
C#
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: 0x02000329 RID: 809
|
|
[Token(Token = "0x2000329")]
|
|
[DebuggerTypeProxy(typeof(SpinLock.SystemThreading_SpinLockDebugView))]
|
|
[DebuggerDisplay("IsHeld = {IsHeld}")]
|
|
[ComVisible(false)]
|
|
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: 0x06001EF5 RID: 7925 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EF5")]
|
|
[Address(RVA = "0xB45960", Offset = "0xB44960", VA = "0x180B45960")]
|
|
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: 0x06001EF6 RID: 7926 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EF6")]
|
|
[Address(RVA = "0xB45690", Offset = "0xB44690", VA = "0x180B45690")]
|
|
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: 0x06001EF7 RID: 7927 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EF7")]
|
|
[Address(RVA = "0xB45880", Offset = "0xB44880", VA = "0x180B45880")]
|
|
public void TryEnter(int millisecondsTimeout, ref bool lockTaken)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001EF8 RID: 7928 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EF8")]
|
|
[Address(RVA = "0xB450F0", Offset = "0xB440F0", VA = "0x180B450F0")]
|
|
private void ContinueTryEnter(int millisecondsTimeout, ref bool lockTaken)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001EF9 RID: 7929 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EF9")]
|
|
[Address(RVA = "0xB45530", Offset = "0xB44530", VA = "0x180B45530")]
|
|
private void DecrementWaiters()
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001EFA RID: 7930 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EFA")]
|
|
[Address(RVA = "0xB44F50", Offset = "0xB43F50", VA = "0x180B44F50")]
|
|
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: 0x06001EFB RID: 7931 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EFB")]
|
|
[Address(RVA = "0xB45820", Offset = "0xB44820", VA = "0x180B45820")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
public void Exit(bool useMemoryBarrier)
|
|
{
|
|
}
|
|
|
|
// Token: 0x06001EFC RID: 7932 RVA: 0x00002050 File Offset: 0x00000250
|
|
[Token(Token = "0x6001EFC")]
|
|
[Address(RVA = "0xB45710", Offset = "0xB44710", VA = "0x180B45710")]
|
|
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: 0x1700045D RID: 1117
|
|
// (get) Token: 0x06001EFD RID: 7933 RVA: 0x00014FE8 File Offset: 0x000131E8
|
|
[Token(Token = "0x1700045D")]
|
|
public bool IsHeldByCurrentThread
|
|
{
|
|
[Token(Token = "0x6001EFD")]
|
|
[Address(RVA = "0xB459A0", Offset = "0xB449A0", VA = "0x180B459A0")]
|
|
[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: 0x1700045E RID: 1118
|
|
// (get) Token: 0x06001EFE RID: 7934 RVA: 0x00015000 File Offset: 0x00013200
|
|
[Token(Token = "0x1700045E")]
|
|
public bool IsThreadOwnerTrackingEnabled
|
|
{
|
|
[Token(Token = "0x6001EFE")]
|
|
[Address(RVA = "0xB45A90", Offset = "0xB44A90", VA = "0x180B45A90")]
|
|
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
|
|
get
|
|
{
|
|
return default(bool);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0400115A RID: 4442
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x400115A")]
|
|
private int m_owner;
|
|
|
|
// Token: 0x0400115B RID: 4443
|
|
[Token(Token = "0x400115B")]
|
|
private static int MAXIMUM_WAITERS;
|
|
|
|
// Token: 0x0200032A RID: 810
|
|
[Token(Token = "0x200032A")]
|
|
internal class SystemThreading_SpinLockDebugView
|
|
{
|
|
}
|
|
}
|
|
}
|