terraria-cpp2il v1.4.4.9
Terraria mobile dump, with CallAnalysis (see source code). Dump with reconstucted method: https://infinitynichto.github.io/terraria-cpp2il-methodrecon
Loading...
Searching...
No Matches
SpinLock.cs
Go to the documentation of this file.
1using System;
7
8namespace System.Threading
9{
10 [global::System.Runtime.InteropServices.ComVisible(false)]
11 [global::System.Diagnostics.DebuggerTypeProxy(typeof(SpinLock.SystemThreading_SpinLockDebugView))]
12 [global::System.Diagnostics.DebuggerDisplay("IsHeld = {IsHeld}")]
13 [global::Cpp2ILInjected.Token(Token = "0x20001E1")]
14 public struct SpinLock
15 {
16 [global::Cpp2ILInjected.Token(Token = "0x600115A")]
17 [global::Cpp2ILInjected.Address(RVA = "0x1C99A9C", Offset = "0x1C99A9C", Length = "0x38")]
18 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = ".ctor", ReturnType = typeof(void))]
19 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 1)]
20 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 3)]
22 {
23 throw null;
24 }
25
26 [global::Cpp2ILInjected.Token(Token = "0x600115B")]
27 [global::Cpp2ILInjected.Address(RVA = "0x1C99AD4", Offset = "0x1C99AD4", Length = "0x7C")]
28 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
29 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "LocalPush", MemberParameters = new object[] { typeof(IThreadPoolWorkItem) }, ReturnType = typeof(void))]
30 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "LocalFindAndPop", MemberParameters = new object[] { typeof(IThreadPoolWorkItem) }, ReturnType = typeof(bool))]
31 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "LocalPop", MemberParameters = new object[] { typeof(ref IThreadPoolWorkItem) }, ReturnType = typeof(bool))]
32 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 4)]
33 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "BeginCriticalRegion", ReturnType = typeof(void))]
34 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "CompareExchange", MemberParameters = new object[]
35 {
36 typeof(ref int),
37 typeof(int),
38 typeof(int),
39 typeof(ref bool)
40 }, ReturnType = typeof(int))]
41 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinLock), Member = "ContinueTryEnter", MemberParameters = new object[]
42 {
43 typeof(int),
44 typeof(ref bool)
45 }, ReturnType = typeof(void))]
46 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 2)]
47 public void Enter(ref bool lockTaken)
48 {
49 throw null;
50 }
51
52 [global::Cpp2ILInjected.Token(Token = "0x600115C")]
53 [global::Cpp2ILInjected.Address(RVA = "0x1C9A00C", Offset = "0x1C9A00C", Length = "0x98")]
54 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
55 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "TrySteal", MemberParameters = new object[]
56 {
57 typeof(ref IThreadPoolWorkItem),
58 typeof(ref bool),
59 typeof(int)
60 }, ReturnType = typeof(bool))]
61 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 1)]
62 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "BeginCriticalRegion", ReturnType = typeof(void))]
63 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "CompareExchange", MemberParameters = new object[]
64 {
65 typeof(ref int),
66 typeof(int),
67 typeof(int),
68 typeof(ref bool)
69 }, ReturnType = typeof(int))]
70 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinLock), Member = "ContinueTryEnter", MemberParameters = new object[]
71 {
72 typeof(int),
73 typeof(ref bool)
74 }, ReturnType = typeof(void))]
75 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 2)]
76 public void TryEnter(int millisecondsTimeout, ref bool lockTaken)
77 {
78 throw null;
79 }
80
81 [global::Cpp2ILInjected.Token(Token = "0x600115D")]
82 [global::Cpp2ILInjected.Address(RVA = "0x1C99B90", Offset = "0x1C99B90", Length = "0x47C")]
83 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
84 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(SpinLock), Member = "Enter", MemberParameters = new object[] { typeof(ref bool) }, ReturnType = typeof(void))]
85 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(SpinLock), Member = "TryEnter", MemberParameters = new object[]
86 {
87 typeof(int),
88 typeof(ref bool)
89 }, ReturnType = typeof(void))]
90 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 2)]
91 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "EndCriticalRegion", ReturnType = typeof(void))]
92 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.Environment), Member = "get_TickCount", ReturnType = typeof(int))]
93 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinLock), Member = "ContinueTryEnterWithThreadTracking", MemberParameters = new object[]
94 {
95 typeof(int),
96 typeof(uint),
97 typeof(ref bool)
98 }, ReturnType = typeof(void))]
99 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "BeginCriticalRegion", ReturnType = typeof(void))]
100 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "CompareExchange", MemberParameters = new object[]
101 {
102 typeof(ref int),
103 typeof(int),
104 typeof(int),
105 typeof(ref bool)
106 }, ReturnType = typeof(int))]
107 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "Add", MemberParameters = new object[]
108 {
109 typeof(ref int),
110 typeof(int)
111 }, ReturnType = typeof(int))]
112 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(PlatformHelper), Member = "get_ProcessorCount", ReturnType = typeof(int))]
113 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinLock), Member = "DecrementWaiters", ReturnType = typeof(void))]
114 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.Environment), Member = "GetResourceString", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(string))]
115 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.ArgumentException), Member = ".ctor", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(void))]
116 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.ArgumentOutOfRangeException), Member = ".ctor", MemberParameters = new object[]
117 {
118 typeof(string),
119 typeof(object),
120 typeof(string)
121 }, ReturnType = typeof(void))]
122 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 29)]
123 private void ContinueTryEnter(int millisecondsTimeout, ref bool lockTaken)
124 {
125 throw null;
126 }
127
128 [global::Cpp2ILInjected.Token(Token = "0x600115E")]
129 [global::Cpp2ILInjected.Address(RVA = "0x1C9A228", Offset = "0x1C9A228", Length = "0x60")]
130 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
131 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(SpinLock), Member = "ContinueTryEnter", MemberParameters = new object[]
132 {
133 typeof(int),
134 typeof(ref bool)
135 }, ReturnType = typeof(void))]
136 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 1)]
137 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "CompareExchange", MemberParameters = new object[]
138 {
139 typeof(ref int),
140 typeof(int),
141 typeof(int)
142 }, ReturnType = typeof(int))]
143 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinWait), Member = "SpinOnceCore", MemberParameters = new object[] { typeof(int) }, ReturnType = typeof(void))]
144 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 2)]
145 private void DecrementWaiters()
146 {
147 throw null;
148 }
149
150 [global::Cpp2ILInjected.Token(Token = "0x600115F")]
151 [global::Cpp2ILInjected.Address(RVA = "0x1C9A100", Offset = "0x1C9A100", Length = "0x128")]
152 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
153 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(SpinLock), Member = "ContinueTryEnter", MemberParameters = new object[]
154 {
155 typeof(int),
156 typeof(ref bool)
157 }, ReturnType = typeof(void))]
158 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 1)]
159 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "get_CurrentThread", ReturnType = typeof(Thread))]
160 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinWait), Member = "SpinOnceCore", MemberParameters = new object[] { typeof(int) }, ReturnType = typeof(void))]
161 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "BeginCriticalRegion", ReturnType = typeof(void))]
162 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "CompareExchange", MemberParameters = new object[]
163 {
164 typeof(ref int),
165 typeof(int),
166 typeof(int),
167 typeof(ref bool)
168 }, ReturnType = typeof(int))]
169 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "EndCriticalRegion", ReturnType = typeof(void))]
170 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinWait), Member = "get_NextSpinWillYield", ReturnType = typeof(bool))]
171 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.Environment), Member = "get_TickCount", ReturnType = typeof(int))]
172 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.Environment), Member = "GetResourceString", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(string))]
173 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(LockRecursionException), Member = ".ctor", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(void))]
174 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 9)]
175 private void ContinueTryEnterWithThreadTracking(int millisecondsTimeout, uint startTime, ref bool lockTaken)
176 {
177 throw null;
178 }
179
180 [global::System.Runtime.ConstrainedExecution.ReliabilityContract(global::System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, global::System.Runtime.ConstrainedExecution.Cer.Success)]
181 [global::Cpp2ILInjected.Token(Token = "0x6001160")]
182 [global::Cpp2ILInjected.Address(RVA = "0x1C9A3AC", Offset = "0x1C9A3AC", Length = "0x50")]
183 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "LocalPush", MemberParameters = new object[] { typeof(IThreadPoolWorkItem) }, ReturnType = typeof(void))]
184 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "LocalFindAndPop", MemberParameters = new object[] { typeof(IThreadPoolWorkItem) }, ReturnType = typeof(bool))]
185 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "LocalPop", MemberParameters = new object[] { typeof(ref IThreadPoolWorkItem) }, ReturnType = typeof(bool))]
186 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(ThreadPoolWorkQueue.WorkStealingQueue), Member = "TrySteal", MemberParameters = new object[]
187 {
188 typeof(ref IThreadPoolWorkItem),
189 typeof(ref bool),
190 typeof(int)
191 }, ReturnType = typeof(bool))]
192 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 10)]
193 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinLock), Member = "ExitSlowPath", MemberParameters = new object[] { typeof(bool) }, ReturnType = typeof(void))]
194 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "EndCriticalRegion", ReturnType = typeof(void))]
195 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 3)]
196 public void Exit(bool useMemoryBarrier)
197 {
198 throw null;
199 }
200
201 [global::Cpp2ILInjected.Token(Token = "0x6001161")]
202 [global::Cpp2ILInjected.Address(RVA = "0x1C9A3FC", Offset = "0x1C9A3FC", Length = "0xD8")]
203 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(SpinLock), Member = "Exit", MemberParameters = new object[] { typeof(bool) }, ReturnType = typeof(void))]
204 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 1)]
205 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SpinLock), Member = "get_IsHeldByCurrentThread", ReturnType = typeof(bool))]
206 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "Exchange", MemberParameters = new object[]
207 {
208 typeof(ref int),
209 typeof(int)
210 }, ReturnType = typeof(int))]
211 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Interlocked), Member = "Decrement", MemberParameters = new object[] { typeof(ref int) }, ReturnType = typeof(int))]
212 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.Environment), Member = "GetResourceString", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(string))]
213 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(SynchronizationLockException), Member = ".ctor", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(void))]
214 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 10)]
216 {
217 throw null;
218 }
219
220 [global::Cpp2ILInjected.Token(Token = "0x1700019E")]
222 {
223 [global::System.Runtime.ConstrainedExecution.ReliabilityContract(global::System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, global::System.Runtime.ConstrainedExecution.Cer.Success)]
224 [global::Cpp2ILInjected.Token(Token = "0x6001162")]
225 [global::Cpp2ILInjected.Address(RVA = "0x1C9A4D4", Offset = "0x1C9A4D4", Length = "0xA4")]
226 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
227 [global::Cpp2ILInjected.CallAnalysis.CalledBy(Type = typeof(SpinLock), Member = "ExitSlowPath", MemberParameters = new object[] { typeof(bool) }, ReturnType = typeof(void))]
228 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 1)]
229 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(Thread), Member = "get_CurrentThread", ReturnType = typeof(Thread))]
230 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.Environment), Member = "GetResourceString", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(string))]
231 [global::Cpp2ILInjected.CallAnalysis.Calls(Type = typeof(global::System.InvalidOperationException), Member = ".ctor", MemberParameters = new object[] { typeof(string) }, ReturnType = typeof(void))]
232 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 8)]
233 get
234 {
235 throw null;
236 }
237 }
238
239 [global::Cpp2ILInjected.Token(Token = "0x1700019F")]
241 {
242 [global::System.Runtime.ConstrainedExecution.ReliabilityContract(global::System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, global::System.Runtime.ConstrainedExecution.Cer.Success)]
243 [global::Cpp2ILInjected.Token(Token = "0x6001163")]
244 [global::Cpp2ILInjected.Address(RVA = "0x1C9A0E4", Offset = "0x1C9A0E4", Length = "0x1C")]
245 [global::Cpp2ILInjected.CallAnalysis.ContainsUnimplementedInstructions]
246 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 0)]
247 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 1)]
248 get
249 {
250 throw null;
251 }
252 }
253
254 // Note: this type is marked as 'beforefieldinit'.
255 [global::Cpp2ILInjected.Token(Token = "0x6001164")]
256 [global::Cpp2ILInjected.Address(RVA = "0x1C9A578", Offset = "0x1C9A578", Length = "0x4C")]
257 [global::Cpp2ILInjected.CallAnalysis.CallerCount(Count = 0)]
258 [global::Cpp2ILInjected.CallAnalysis.CallsUnknownMethods(Count = 1)]
259 static SpinLock()
260 {
261 throw null;
262 }
263
264 [global::Cpp2ILInjected.Token(Token = "0x4000963")]
265 [global::Cpp2ILInjected.FieldOffset(Offset = "0x0")]
266 private int m_owner;
267
268 [global::Cpp2ILInjected.Token(Token = "0x4000964")]
269 private static int MAXIMUM_WAITERS;
270
271 [global::Cpp2ILInjected.Token(Token = "0x20001E2")]
273 {
274 }
275 }
276}
class f__AnonymousType0<< Count > j__TPar
void Enter(ref bool lockTaken)
Definition SpinLock.cs:47
SpinLock(bool enableThreadOwnerTracking)
Definition SpinLock.cs:21
void ContinueTryEnterWithThreadTracking(int millisecondsTimeout, uint startTime, ref bool lockTaken)
Definition SpinLock.cs:175
void ContinueTryEnter(int millisecondsTimeout, ref bool lockTaken)
Definition SpinLock.cs:123
void TryEnter(int millisecondsTimeout, ref bool lockTaken)
Definition SpinLock.cs:76
void ExitSlowPath(bool useMemoryBarrier)
Definition SpinLock.cs:215
void Exit(bool useMemoryBarrier)
Definition SpinLock.cs:196