switch C code prefix to NIF
This commit is contained in:
@@ -75,7 +75,7 @@ namespace Nitload.Common.HighPerformance.ProcessorAbstraction
|
||||
NumaFreeNative(address, size, numaId);
|
||||
}
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "sn_get_numa_each")]
|
||||
[LibraryImport(Native.LibName, EntryPoint = "nif_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 = "sn_get_numa_overall")]
|
||||
[LibraryImport(Native.LibName, EntryPoint = "nif_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 = "sn_set_thread_affinity")]
|
||||
[LibraryImport(Native.LibName, EntryPoint = "nif_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 = "sn_numa_alloc")]
|
||||
[LibraryImport(Native.LibName, EntryPoint = "nif_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 = "sn_numa_free")]
|
||||
[LibraryImport(Native.LibName, EntryPoint = "nif_numa_free")]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
|
||||
private static unsafe partial void NumaFreeNative(
|
||||
|
||||
Reference in New Issue
Block a user