Xamarin Public Jenkins (auto-signing) ef583813eb Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
2019-07-26 19:53:28 +00:00

41 lines
875 B
C#

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
int domain_id;
int context_id;
UIntPtr static_data; /* GC-tracked */
UIntPtr data;
#endregion
#pragma warning restore 169, 414
[MethodImpl (MethodImplOptions.InternalCall)]
extern static void RegisterContext (Context ctx);
[MethodImpl (MethodImplOptions.InternalCall)]
extern static 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);
}
}
}