mono_thread_info_tls_set (info, TLS_KEY_DOMAIN, (x)); \
} while (FALSE)
+#ifndef ENABLE_NETCORE
#define GET_APPCONTEXT() (mono_thread_internal_current ()->current_appcontext)
#define SET_APPCONTEXT(x) MONO_OBJECT_SETREF_INTERNAL (mono_thread_internal_current (), current_appcontext, (x))
+#else
+#define GET_APPCONTEXT() NULL
+#define SET_APPCONTEXT(x)
+#endif
static guint16 appdomain_list_size = 0;
static guint16 appdomain_next = 0;
gsize debugger_thread; // FIXME switch to bool as soon as CI testing with corlib version bump works
gpointer *static_data;
struct _MonoThreadInfo *thread_info;
+#ifndef ENABLE_NETCORE
MonoAppContext *current_appcontext;
+#endif
MonoThread *root_domain_thread;
MonoObject *_serialized_principal;
int _serialized_principal_version;
mono_custom_attrs_free (ainfo);
return SPECIAL_STATIC_THREAD;
}
+#ifndef ENABLE_NETCORE
else if (strcmp (klass_name, "ContextStaticAttribute") == 0) {
mono_custom_attrs_free (ainfo);
return SPECIAL_STATIC_CONTEXT;
}
+#endif
}
}
mono_custom_attrs_free (ainfo);
thread->abort_state_handle = 0;
thread->abort_exc = NULL;
+#ifndef ENABLE_NETCORE
thread->current_appcontext = NULL;
+#endif
LOCK_THREAD (thread);
if (static_type == SPECIAL_STATIC_OFFSET_TYPE_THREAD) {
return get_thread_static_data (thread, offset);
} else {
+#ifndef ENABLE_NETCORE
return get_context_static_data (thread->current_appcontext, offset);
+#else
+ g_assert_not_reached ();
+#endif
}
}
<Compile Include="$(BclSourcesRoot)\System\Runtime\InteropServices\SafeHandle.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\Intrinsics\X86\X86Base.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Runtime\Loader\AssemblyLoadContext.Mono.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Runtime\Remoting\Contexts\Context.cs" />
<Compile Include="$(BclSourcesRoot)\System\Security\DynamicSecurityMethodAttribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Interlocked.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Monitor.Mono.cs" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Remoting.Contexts
-{
-
- [StructLayout(LayoutKind.Sequential)]
- /* FIXME: Mono: this was public in mscorlib */
- internal class Context
- {
-#pragma warning disable 169, 414
- #region Sync with domain-internals.h
- private int domain_id;
- private int context_id;
- private UIntPtr static_data; /* GC-tracked */
- private UIntPtr data;
- #endregion
-#pragma warning restore 169, 414
-
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void RegisterContext(Context ctx);
-
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void ReleaseContext(Context ctx);
-
- public Context()
- {
-#if false
- domain_id = Thread.GetDomainID();
- context_id = Interlocked.Increment (ref global_count);
-
- RegisterContext (this);
-#endif
- }
-
- ~Context()
- {
- ReleaseContext(this);
- }
- }
-}
private IntPtr debugger_thread; // FIXME switch to bool as soon as CI testing with corlib version bump works
private UIntPtr static_data; /* GC-tracked */
private IntPtr runtime_thread_info;
- /* current System.Runtime.Remoting.Contexts.Context instance
- keep as an object to avoid triggering its class constructor when not needed */
- private object? current_appcontext;
private object? root_domain_thread;
internal byte[]? _serialized_principal;
internal int _serialized_principal_version;