terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
SpinLock.cs
Go to the documentation of this file.
1using System;
6
7namespace System.Threading
8{
9 // Token: 0x020001E1 RID: 481
10 [ComVisible(false)]
11 [DebuggerTypeProxy(typeof(SpinLock.SystemThreading_SpinLockDebugView))]
12 [DebuggerDisplay("IsHeld = {IsHeld}")]
13 public struct SpinLock
14 {
15 // Token: 0x0600115A RID: 4442 RVA: 0x00024CF8 File Offset: 0x00022EF8
17 {
18 this.m_owner = 32768;
19 }
20
21 // Token: 0x0600115B RID: 4443 RVA: 0x00024D10 File Offset: 0x00022F10
22 public void Enter(bool lockTaken)
23 {
25 }
26
27 // Token: 0x0600115C RID: 4444 RVA: 0x00024D2C File Offset: 0x00022F2C
28 public void TryEnter(int millisecondsTimeout, bool lockTaken)
29 {
31 }
32
33 // Token: 0x0600115D RID: 4445 RVA: 0x00024D48 File Offset: 0x00022F48
34 private void ContinueTryEnter(int millisecondsTimeout, bool lockTaken)
35 {
37 }
38
39 // Token: 0x0600115E RID: 4446 RVA: 0x00024DDC File Offset: 0x00022FDC
40 private void DecrementWaiters()
41 {
42 }
43
44 // Token: 0x0600115F RID: 4447 RVA: 0x00024DF0 File Offset: 0x00022FF0
45 private void ContinueTryEnterWithThreadTracking(int millisecondsTimeout, uint startTime, bool lockTaken)
46 {
48 do
49 {
51 }
52 while (currentThread.internal_thread != null);
55 int num;
56 if (num != 0)
57 {
59 if (millisecondsTimeout != 0)
60 {
62 }
63 }
64 }
65
66 // Token: 0x06001160 RID: 4448 RVA: 0x00024E40 File Offset: 0x00023040
67 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
68 public void Exit(bool useMemoryBarrier)
69 {
70 }
71
72 // Token: 0x06001161 RID: 4449 RVA: 0x00024E5C File Offset: 0x0002305C
73 private void ExitSlowPath(bool useMemoryBarrier)
74 {
76 }
77
78 // Token: 0x1700019E RID: 414
79 // (get) Token: 0x06001162 RID: 4450 RVA: 0x00024E88 File Offset: 0x00023088
81 {
82 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
83 get
84 {
85 /*
86An exception occurred when decompiling this method (06001162)
87
88ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Threading.SpinLock::get_IsHeldByCurrentThread()
89
90 ---> System.Exception: Basic block has to end with unconditional control flow.
91{
92 Block_0:
93 stloc:int32(var_1_19, ldfld:int32(InternalThread::managed_id, ldfld:InternalThread(Thread::internal_thread, ldloc:Thread(var_0_05))))
94 stloc:string(var_2_24, call:string(Environment::GetResourceString, ldstr:string("Thread tracking is disabled.")))
95}
96
97 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
98 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
99 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
100 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
101 --- End of inner exception stack trace ---
102 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
103 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
104*/;
105 }
106 }
107
108 // Token: 0x1700019F RID: 415
109 // (get) Token: 0x06001163 RID: 4451 RVA: 0x0000207A File Offset: 0x0000027A
111 {
112 [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
113 get
114 {
115 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
116 }
117 }
118
119 // Token: 0x06001164 RID: 4452 RVA: 0x00024EBC File Offset: 0x000230BC
120 // Note: this type is marked as 'beforefieldinit'.
121 static SpinLock()
122 {
123 }
124
125 // Token: 0x04000963 RID: 2403
126 private int m_owner;
127
128 // Token: 0x04000964 RID: 2404
129 private static int MAXIMUM_WAITERS;
130
131 // Token: 0x020001E2 RID: 482
133 {
134 }
135 }
136}
class f__AnonymousType0<< Count > j__TPar
static int TickCount
static void EndCriticalRegion()
Definition Thread.cs:654
static Thread CurrentThread
Definition Thread.cs:381
InternalThread internal_thread
Definition Thread.cs:751
static void BeginCriticalRegion()
Definition Thread.cs:641
void ContinueTryEnter(int millisecondsTimeout, bool lockTaken)
Definition SpinLock.cs:34
SpinLock(bool enableThreadOwnerTracking)
Definition SpinLock.cs:16
void ContinueTryEnterWithThreadTracking(int millisecondsTimeout, uint startTime, bool lockTaken)
Definition SpinLock.cs:45
void Enter(bool lockTaken)
Definition SpinLock.cs:22
void ExitSlowPath(bool useMemoryBarrier)
Definition SpinLock.cs:73
void Exit(bool useMemoryBarrier)
Definition SpinLock.cs:68
void TryEnter(int millisecondsTimeout, bool lockTaken)
Definition SpinLock.cs:28