singrdk/base/Libraries/Singularity.V1/Threads/ContainerHandle.cs

44 lines
1.2 KiB
C#
Raw Permalink Normal View History

2008-03-05 09:52:00 -05:00
////////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity - Singularity ABI
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: ContainerHandle.cs
//
// Note:
//
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.Singularity.V1.Threads
{
public struct ContainerHandle
{
public readonly UIntPtr id;
[NoHeapAllocation]
public static bool Create(out ContainerHandle container)
{
unsafe {
fixed (ContainerHandle * containerPtr = &container) {
return CreateImpl(containerPtr);
}
}
}
[OutsideGCDomain]
[NoHeapAllocation]
[StackBound(1170)]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern unsafe bool CreateImpl(ContainerHandle * container);
[OutsideGCDomain]
[NoHeapAllocation]
[StackBound(192)]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern void Dispose(ContainerHandle container);
}
}