|
// <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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
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
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
internal static partial int GetPipeSz(global::Microsoft.Win32.SafeHandles.SafePipeHandle fd)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafePipeHandle>.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_FcntlGetPipeSz", 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.27405")]
internal static partial int SetPipeSz(global::Microsoft.Win32.SafeHandles.SafePipeHandle fd, int size)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafePipeHandle>.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, size);
__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_FcntlSetPipeSz", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __size_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlCanGetSetPipeSz", ExactSpelling = true)]
private static extern partial int FcntlCanGetSetPipeSz();
}
}
}
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.27405")]
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.27405")]
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.27405")]
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.27405")]
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.27405")]
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.27405")]
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.27405")]
internal static partial int FLock(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, global::Interop.Sys.LockOperations operation)
{
int __lastError;
nint __fd_native = default;
int __retVal = 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();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, operation);
__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_FLock", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __operation_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
internal static partial int FLock(nint fd, global::Interop.Sys.LockOperations operation)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd, operation);
__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_FLock", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __operation_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
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.27405")]
internal static partial global::Microsoft.Win32.SafeHandles.SafeFileHandle Open(string filename, global::Interop.Sys.OpenFlags flags, int mode)
{
int __lastError;
bool __invokeSucceeded = default;
byte* __filename_native = default;
global::Microsoft.Win32.SafeHandles.SafeFileHandle __retVal = default;
nint __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __filename_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__filename_native__marshaller.FromManaged(filename, 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.
__filename_native = __filename_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(__filename_native, flags, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
__invokeSucceeded = true;
// UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
__retVal_native__marshaller.FromUnmanaged(__retVal_native);
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native__marshaller.ToManaged();
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
__retVal_native__marshaller.Free();
}
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__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_Open", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __filename_native, global::Interop.Sys.OpenFlags __flags_native, int __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.27405")]
internal static unsafe partial int Pipe(int* pipefd, global::Interop.Sys.PipeFlags flags)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(pipefd, flags);
__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_Pipe", ExactSpelling = true)]
static extern unsafe int __PInvoke(int* __pipefd_native, global::Interop.Sys.PipeFlags __flags_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
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.27405")]
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.27405")]
internal static unsafe partial int Read(global::Microsoft.Win32.SafeHandles.SafePipeHandle 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::Microsoft.Win32.SafeHandles.SafePipeHandle>.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.27405")]
internal static partial int Unlink(string pathname)
{
int __lastError;
byte* __pathname_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __pathname_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__pathname_native__marshaller.FromManaged(pathname, 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.
__pathname_native = __pathname_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__pathname_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__pathname_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Unlink", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __pathname_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
internal static unsafe partial int Write(global::Microsoft.Win32.SafeHandles.SafePipeHandle fd, byte* buffer, int bufferSize)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafePipeHandle>.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, bufferSize);
__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_Write", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
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.27405")]
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.27405")]
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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27405")]
internal static partial int FStat(global::Microsoft.Win32.SafeHandles.SafePipeHandle 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::Microsoft.Win32.SafeHandles.SafePipeHandle>.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.27405")]
internal static partial int GetPeerID(global::System.Runtime.InteropServices.SafeHandle socket, out uint euid)
{
int __lastError;
euid = default;
nint __socket_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__socket_native__marshaller.FromManaged(socket);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (uint* __euid_native = &euid)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__socket_native = __socket_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__socket_native, __euid_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__socket_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPeerID", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __socket_native, uint* __euid_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_SetEUid", ExactSpelling = true)]
internal static extern partial int SetEUid(uint euid);
}
}
|