Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/class
diff options
context:
space:
mode:
authorAleksey Kliger (λgeek) <alklig@microsoft.com>2020-01-17 05:57:54 +0300
committerGitHub <noreply@github.com>2020-01-17 05:57:54 +0300
commitc1498b8d4ce83732d1bab794005cc12f8319053d (patch)
tree429fb5e24873f9068e92bf860d324fde8a0002e0 /mcs/class
parent2ba25542e3f3c396ab0b3f516d80c968b39acb23 (diff)
[runtime] NOHANDLES for ves_icall_System_Threading_Thread_GetCurrentThread (#18480)
* [runtime] NOHANDLES for ves_icall_System_Threading_Thread_GetCurrentThread This function (and its call to mono_handle_new) was showing up in the flamegraph for some async-heavy benchmarks
Diffstat (limited to 'mcs/class')
-rw-r--r--mcs/class/corlib/System.Threading/Thread.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs
index f5c4b314e63..7e2db6cff11 100644
--- a/mcs/class/corlib/System.Threading/Thread.cs
+++ b/mcs/class/corlib/System.Threading/Thread.cs
@@ -306,7 +306,13 @@ namespace System.Threading {
#endif
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static Thread GetCurrentThread ();
+ private extern static void GetCurrentThread_icall (ref Thread thread);
+
+ private static Thread GetCurrentThread () {
+ Thread thread = null;
+ GetCurrentThread_icall (ref thread);
+ return thread;
+ }
public static Thread CurrentThread {
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]