File: _generated\0\LibraryImports.g.cs
Web Access
Project: src\src\msbuild\src\Framework\Microsoft.Build.Framework.csproj (Microsoft.Build.Framework)
// <auto-generated/>
namespace Microsoft.Build.Shared
{
    internal static unsafe partial class ProcessExtensions
    {
        private static unsafe partial class BSD
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
            [global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
            private static partial int sysctl(global::System.ReadOnlySpan<int> name, uint namelen, global::System.Span<byte> oldp, ref nuint oldlenp, global::System.ReadOnlySpan<byte> newp, nuint newlen)
            {
                int __lastError;
                int __retVal;
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __newp_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(newp))
                fixed (nuint* __oldlenp_native = &oldlenp)
                fixed (void* __oldp_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(oldp))
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke((int*)__name_native, namelen, (byte*)__oldp_native, __oldlenp_native, (byte*)__newp_native, newlen);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libc", EntryPoint = "sysctl", ExactSpelling = true)]
                static extern unsafe int __PInvoke(int* __name_native, uint __namelen_native, byte* __oldp_native, nuint* __oldlenp_native, byte* __newp_native, nuint __newlen_native);
            }
        }
    }
}