public static void Dispose(ContainerHandle container) { Tracing.Log(Tracing.Debug, "ContainerHandle.Dispose(id={0:x8})", container.id); Thread.CurrentProcess.ReleaseHandle(container.id); }
public static bool Create(out ContainerHandle container) { container = new ContainerHandle(Thread.CurrentProcess.AllocateHandle()); Tracing.Log(Tracing.Debug, "ContainerHandle.Create(out id={0:x8})", container.id); return(true); }
public static unsafe bool CreateImpl( int threadIndex, ContainerHandle container, ThreadHandle *handle, UIntPtr *threadContext) { return(Create(threadIndex, container, out *handle, out *threadContext)); }
public static bool Create(out ContainerHandle container) { unsafe { fixed(ContainerHandle *containerPtr = &container) { return(CreateImpl(containerPtr)); } } }
public static unsafe bool Create(int threadIndex, ContainerHandle container, out ThreadHandle handle, out UIntPtr threadContext) { bool ret = Thread.CurrentProcess.CreateThread(threadIndex, out handle, out threadContext); Tracing.Log(Tracing.Debug, "ThreadHandle.Create(index={0}, cont={1:x8}) = {2:x8}", (UIntPtr) unchecked ((uint)threadIndex), container.id, handle.id); return(ret); }
public static unsafe bool Create(int threadIndex, ContainerHandle container, out ThreadHandle thread, out UIntPtr threadContext) { fixed(ThreadHandle *threadPtr = &thread) { fixed(UIntPtr *threadContextPtr = &threadContext) { return(CreateImpl(threadIndex, container, threadPtr, threadContextPtr)); } } }
public static unsafe extern bool CreateImpl( int threadIndex, ContainerHandle container, ThreadHandle *thread, UIntPtr *threadContext);
public static extern void Dispose(ContainerHandle container);