merge C base name prefix to nfn

This commit is contained in:
2026-09-27 00:59:42 +08:00
parent 9fc23c29fb
commit e24efd9f9c
52 changed files with 1002 additions and 1142 deletions
@@ -75,7 +75,7 @@ namespace Nitload.Common.HighPerformance.ProcessorAbstraction
NumaFreeNative(address, size, numaId);
}
[LibraryImport(Native.LibName, EntryPoint = "nif_get_numa_each")]
[LibraryImport(Native.LibName, EntryPoint = "nfn_get_numa_each")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
public static partial int GetNumaEach(
@@ -84,7 +84,7 @@ namespace Nitload.Common.HighPerformance.ProcessorAbstraction
Span<uint> globalCpuIdInNuma
);
[LibraryImport(Native.LibName, EntryPoint = "nif_get_numa_overall")]
[LibraryImport(Native.LibName, EntryPoint = "nfn_get_numa_overall")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
public static partial int GetNumaOverall(
@@ -119,7 +119,7 @@ namespace Nitload.Common.HighPerformance.ProcessorAbstraction
}
}
[LibraryImport(Native.LibName, EntryPoint = "nif_set_thread_affinity")]
[LibraryImport(Native.LibName, EntryPoint = "nfn_set_thread_affinity")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
internal static partial void SetThreadAffinity(
@@ -138,7 +138,7 @@ namespace Nitload.Common.HighPerformance.ProcessorAbstraction
return new(numaId, count, globalIndex);
}
[LibraryImport(Native.LibName, EntryPoint = "nif_numa_alloc")]
[LibraryImport(Native.LibName, EntryPoint = "nfn_numa_alloc")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
private static unsafe partial void* NumaAllocNative(
@@ -146,7 +146,7 @@ namespace Nitload.Common.HighPerformance.ProcessorAbstraction
int numaId
);
[LibraryImport(Native.LibName, EntryPoint = "nif_numa_free")]
[LibraryImport(Native.LibName, EntryPoint = "nfn_numa_free")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
private static unsafe partial void NumaFreeNative(