File: _generated\0\LibraryImports.g.cs
Web Access
Project: src\src\runtime\src\libraries\System.Diagnostics.Process\src\System.Diagnostics.Process.csproj (System.Diagnostics.Process)
// <auto-generated/>
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPlatformToPal", ExactSpelling = true)]
        internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPalToPlatform", ExactSpelling = true)]
        internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_StrErrorR", ExactSpelling = true)]
        private static unsafe extern partial byte* StrErrorR(int platformErrno, byte* buffer, int bufferSize);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Poll", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error Poll(global::Interop.PollEvent* pollEvents, uint eventCount, int timeout, uint* triggered);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        internal static unsafe partial class Fcntl
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
            internal static partial int DangerousSetIsNonBlocking(nint fd, int isNonBlocking)
            {
                int __lastError;
                int __retVal;
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(fd, isNonBlocking);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetIsNonBlocking", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native, int __isNonBlocking_native);
            }
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        internal static unsafe partial class Fcntl
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
            internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking)
            {
                int __lastError;
                nint __fd_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __fd_native__marshaller.FromManaged(fd);
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __fd_native = __fd_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__fd_native, isNonBlocking);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __fd_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetIsNonBlocking", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native, int __isNonBlocking_native);
            }
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        internal static unsafe partial class Fcntl
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
            internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking)
            {
                int __lastError;
                isNonBlocking = default;
                nint __fd_native = default;
                int __isNonBlocking_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __fd_native__marshaller.FromManaged(fd);
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __fd_native = __fd_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__fd_native, &__isNonBlocking_native);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
 
                    // Unmarshal - Convert native data to managed data.
                    isNonBlocking = __isNonBlocking_native != 0;
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __fd_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetIsNonBlocking", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native, int* __isNonBlocking_native);
            }
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        internal static unsafe partial class Fcntl
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
            internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags)
            {
                int __lastError;
                nint __fd_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __fd_native__marshaller.FromManaged(fd);
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __fd_native = __fd_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__fd_native, flags);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __fd_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetFD", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native, int __flags_native);
            }
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        internal static unsafe partial class Fcntl
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
            internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd)
            {
                int __lastError;
                nint __fd_native = default;
                int __retVal = default;
                // Setup - Perform required setup.
                global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
                try
                {
                    // Marshal - Convert managed data to native data.
                    __fd_native__marshaller.FromManaged(fd);
                    {
                        // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                        __fd_native = __fd_native__marshaller.ToUnmanaged();
                        global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                        __retVal = __PInvoke(__fd_native);
                        __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                    }
                }
                finally
                {
                    // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                    __fd_native__marshaller.Free();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetFD", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native);
            }
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        internal static unsafe partial class Fcntl
        {
            [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
            internal static partial int GetFD(nint fd)
            {
                int __lastError;
                int __retVal;
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(fd);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
                return __retVal;
                // Local P/Invoke
                [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetFD", ExactSpelling = true)]
                static extern unsafe int __PInvoke(nint __fd_native);
            }
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, buffer, count);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Read", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, buffer, count);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadFromNonblocking", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int Close(nint fd)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(fd);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Close", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static unsafe partial int GetHostName(byte* name, int nameLength)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(name, nameLength);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetHostName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, int __nameLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial long SysConf(global::Interop.Sys.SysConfName name)
        {
            int __lastError;
            long __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(name);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SysConf", ExactSpelling = true)]
            static extern unsafe long __PInvoke(global::Interop.Sys.SysConfName __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static unsafe partial int ForkAndExecProcess(string filename, byte** argv, byte** envp, string cwd, int setUser, uint userId, uint groupId, uint* groups, int groupsLength, out int lpChildPid, int stdinFd, int stdoutFd, int stderrFd, int* inheritedFds, int inheritedFdCount, int startDetached, int killOnParentExit)
        {
            int __lastError;
            lpChildPid = default;
            byte* __filename_native = default;
            byte* __cwd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __cwd_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __filename_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __cwd_native__marshaller.FromManaged(cwd, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __filename_native__marshaller.FromManaged(filename, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __lpChildPid_native = &lpChildPid)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __cwd_native = __cwd_native__marshaller.ToUnmanaged();
                    __filename_native = __filename_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__filename_native, argv, envp, __cwd_native, setUser, userId, groupId, groups, groupsLength, __lpChildPid_native, stdinFd, stdoutFd, stderrFd, inheritedFds, inheritedFdCount, startDetached, killOnParentExit);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __cwd_native__marshaller.Free();
                __filename_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ForkAndExecProcess", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __filename_native, byte** __argv_native, byte** __envp_native, byte* __cwd_native, int __setUser_native, uint __userId_native, uint __groupId_native, uint* __groups_native, int __groupsLength_native, int* __lpChildPid_native, int __stdinFd_native, int __stdoutFd_native, int __stderrFd_native, int* __inheritedFds_native, int __inheritedFdCount_native, int __startDetached_native, int __killOnParentExit_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static unsafe partial int GetGroupList(string name, uint group, uint* groups, int* ngroups)
        {
            int __lastError;
            byte* __name_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__name_native, group, groups, ngroups);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetGroupList", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, uint __group_native, uint* __groups_native, int* __ngroups_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static unsafe partial int GetPwUidR(uint uid, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
        {
            pwd = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
            {
                __retVal = __PInvoke(uid, __pwd_native, buf, bufLen);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwUidR", ExactSpelling = true)]
            static extern unsafe int __PInvoke(uint __uid_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static unsafe partial int GetPwNamR(string name, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
        {
            pwd = default;
            byte* __name_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__name_native, __pwd_native, buf, bufLen);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwNamR", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static partial int GetPriority(global::Interop.Sys.PriorityWhich which, int who)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(which, who);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPriority", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::Interop.Sys.PriorityWhich __which_native, int __who_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int SetPriority(global::Interop.Sys.PriorityWhich which, int who, int nice)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(which, who, nice);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetPriority", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::Interop.Sys.PriorityWhich __which_native, int __who_native, int __nice_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSid", ExactSpelling = true)]
        internal static extern partial int GetSid(int pid);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial bool InitializeTerminalAndSignalHandling()
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke();
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_InitializeTerminalAndSignalHandling", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial void SetKeypadXmit(global::Microsoft.Win32.SafeHandles.SafeFileHandle terminalHandle, string terminfoString)
        {
            nint __terminalHandle_native = default;
            byte* __terminfoString_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __terminfoString_native__marshaller = new();
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __terminalHandle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __terminfoString_native__marshaller.FromManaged(terminfoString, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __terminalHandle_native__marshaller.FromManaged(terminalHandle);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __terminfoString_native = __terminfoString_native__marshaller.ToUnmanaged();
                    __terminalHandle_native = __terminalHandle_native__marshaller.ToUnmanaged();
                    __PInvoke(__terminalHandle_native, __terminfoString_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __terminfoString_native__marshaller.Free();
                __terminalHandle_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetKeypadXmit", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __terminalHandle_native, byte* __terminfoString_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_UninitializeTerminal", ExactSpelling = true)]
        internal static extern partial void UninitializeTerminal();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int Kill(int pid, int signal)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(pid, signal);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Kill", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __pid_native, int __signal_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetPosixSignalHandler", ExactSpelling = true)]
        internal static unsafe extern partial void SetPosixSignalHandler(delegate* unmanaged<int, global::System.Runtime.InteropServices.PosixSignal, int> handler);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial bool EnablePosixSignalHandling(int signal)
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke(signal);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_EnablePosixSignalHandling", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __signal_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_DisablePosixSignalHandling", ExactSpelling = true)]
        internal static extern partial void DisablePosixSignalHandling(int signal);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_HandleNonCanceledPosixSignal", ExactSpelling = true)]
        internal static extern partial void HandleNonCanceledPosixSignal(int signal);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPlatformSignalNumber", ExactSpelling = true)]
        internal static extern partial int GetPlatformSignalNumber(global::System.Runtime.InteropServices.PosixSignal signal);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPlatformSIGSTOP", ExactSpelling = true)]
        internal static extern partial int GetPlatformSIGSTOP();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static partial int ReadLink(global::System.ReadOnlySpan<char> path, ref byte buffer, int bufferSize)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (byte* __buffer_native = &buffer)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, __buffer_native, bufferSize);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadLink", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, byte* __buffer_native, int __bufferSize_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_RegisterForSigChld", ExactSpelling = true)]
        internal static unsafe extern partial void RegisterForSigChld(delegate* unmanaged<int, int, int> handler);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetDelayedSigChildConsoleConfigurationHandler", ExactSpelling = true)]
        internal static unsafe extern partial void SetDelayedSigChildConsoleConfigurationHandler(delegate* unmanaged<void> callback);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int GetRLimit(global::Interop.Sys.RlimitResources resourceType, out global::Interop.Sys.RLimit limits)
        {
            int __lastError;
            limits = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.RLimit* __limits_native = &limits)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(resourceType, __limits_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetRLimit", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::Interop.Sys.RlimitResources __resourceType_native, global::Interop.Sys.RLimit* __limits_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int SetRLimit(global::Interop.Sys.RlimitResources resourceType, ref global::Interop.Sys.RLimit limits)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.RLimit* __limits_native = &limits)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(resourceType, __limits_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetRLimit", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::Interop.Sys.RlimitResources __resourceType_native, global::Interop.Sys.RLimit* __limits_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static partial int PathConf(string path, global::Interop.Sys.PathConfName name)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, name);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PathConf", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.PathConfName __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int WaitIdAnyExitedNoHangNoWait()
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke();
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_WaitIdAnyExitedNoHangNoWait", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int WaitPidExitedNoHang(int pid, out int exitCode, out int terminatingSignal)
        {
            int __lastError;
            exitCode = default;
            terminatingSignal = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __terminatingSignal_native = &terminatingSignal)
            fixed (int* __exitCode_native = &exitCode)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(pid, __exitCode_native, __terminatingSignal_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_WaitPidExitedNoHang", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __pid_native, int* __exitCode_native, int* __terminatingSignal_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int Access(string path, global::Interop.Sys.AccessMode mode)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, mode);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Access", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.AccessMode __mode_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, __output_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, __output_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, __output_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEUid", ExactSpelling = true)]
        internal static extern partial uint GetEUid();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEGid", ExactSpelling = true)]
        private static extern partial uint GetEGid();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static unsafe partial int GetGroups(int ngroups, uint* groups)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(ngroups, groups);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetGroups", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __ngroups_native, uint* __groups_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static partial bool IsAtomicNonInheritablePipeCreationSupportedImpl()
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_IsAtomicNonInheritablePipeCreationSupported", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial bool IsATty(nint fd)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(fd);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_IsATty", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial bool IsATty(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd)
        {
            nint __fd_native = default;
            bool __retVal = default;
            int __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    __retVal_native = __PInvoke(__fd_native);
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_IsATty", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial void ConfigureTerminalForChildProcess(bool childUsesTerminal)
        {
            int __childUsesTerminal_native;
            // Marshal - Convert managed data to native data.
            __childUsesTerminal_native = (int)(childUsesTerminal ? 1 : 0);
            {
                __PInvoke(__childUsesTerminal_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConfigureTerminalForChildProcess", ExactSpelling = true)]
            static extern unsafe void __PInvoke(int __childUsesTerminal_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int GetSpaceInfoForMountPoint(string name, out global::Interop.Sys.MountPointInformation mpi)
        {
            int __lastError;
            mpi = default;
            byte* __name_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.MountPointInformation* __mpi_native = &mpi)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__name_native, __mpi_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSpaceInfoForMountPoint", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, global::Interop.Sys.MountPointInformation* __mpi_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        private static unsafe partial int GetFileSystemTypeNameForMountPoint(string name, byte* formatNameBuffer, int bufferLength, long* formatType)
        {
            int __lastError;
            byte* __name_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__name_native, formatNameBuffer, bufferLength, formatType);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetFileSystemTypeNameForMountPoint", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, byte* __formatNameBuffer_native, int __bufferLength_native, long* __formatType_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial string RealPath(string path)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            byte* __path_native = default;
            string __retVal = default;
            byte* __retVal_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__path_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                __retVal = global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToManaged(__retVal_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__retVal_native);
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_RealPath", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke(byte* __path_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetBootTimeTicks", ExactSpelling = true)]
        internal static extern partial long GetBootTimeTicks();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int SchedSetAffinity(int pid, ref nint mask)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (nint* __mask_native = &mask)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(pid, __mask_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SchedSetAffinity", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __pid_native, nint* __mask_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27024")]
        internal static partial int SchedGetAffinity(int pid, out nint mask)
        {
            int __lastError;
            mask = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (nint* __mask_native = &mask)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(pid, __mask_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SchedGetAffinity", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __pid_native, nint* __mask_native);
        }
    }
}