Skip to content

Commit ef2c904

Browse files
authored
Cleanup name of CreateThread shim (#62648)
1 parent 1e0878c commit ef2c904

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.CoreRT.Unix.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private unsafe bool CreateThread(GCHandle thisThreadHandle)
9191
// This also avoids OOM after creating the thread.
9292
_stopped = new ManualResetEvent(false);
9393

94-
if (!Interop.Sys.RuntimeThread_CreateThread((IntPtr)_startHelper!._maxStackSize, &ThreadEntryPoint, (IntPtr)thisThreadHandle))
94+
if (!Interop.Sys.CreateThread((IntPtr)_startHelper!._maxStackSize, &ThreadEntryPoint, (IntPtr)thisThreadHandle))
9595
{
9696
return false;
9797
}

src/libraries/Common/src/Interop/Unix/System.Native/Interop.Threading.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal static partial class Interop
88
{
99
internal unsafe partial class Sys
1010
{
11-
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_RuntimeThread_CreateThread")]
12-
internal static extern unsafe bool RuntimeThread_CreateThread(IntPtr stackSize, delegate* unmanaged<IntPtr, IntPtr> startAddress, IntPtr parameter);
11+
[DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_CreateThread")]
12+
internal static extern unsafe bool CreateThread(IntPtr stackSize, delegate* unmanaged<IntPtr, IntPtr> startAddress, IntPtr parameter);
1313
}
1414
}

src/native/libs/System.Native/entrypoints.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ static const Entry s_sysNative[] =
260260
DllImportEntry(SystemNative_PWrite)
261261
DllImportEntry(SystemNative_PReadV)
262262
DllImportEntry(SystemNative_PWriteV)
263-
DllImportEntry(SystemNative_RuntimeThread_CreateThread)
263+
DllImportEntry(SystemNative_CreateThread)
264264
DllImportEntry(SystemNative_EnablePosixSignalHandling)
265265
DllImportEntry(SystemNative_DisablePosixSignalHandling)
266266
DllImportEntry(SystemNative_HandleNonCanceledPosixSignal)

src/native/libs/System.Native/pal_threading.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void SystemNative_LowLevelMonitor_Signal_Release(LowLevelMonitor* monitor)
218218
(void)error; // unused in release build
219219
}
220220

221-
int32_t SystemNative_RuntimeThread_CreateThread(uintptr_t stackSize, void *(*startAddress)(void*), void *parameter)
221+
int32_t SystemNative_CreateThread(uintptr_t stackSize, void *(*startAddress)(void*), void *parameter)
222222
{
223223
bool result = false;
224224
pthread_attr_t attrs;

src/native/libs/System.Native/pal_threading.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ PALEXPORT int32_t SystemNative_LowLevelMonitor_TimedWait(LowLevelMonitor *monito
2222

2323
PALEXPORT void SystemNative_LowLevelMonitor_Signal_Release(LowLevelMonitor* monitor);
2424

25-
PALEXPORT int32_t SystemNative_RuntimeThread_CreateThread(uintptr_t stackSize, void *(*startAddress)(void*), void *parameter);
25+
PALEXPORT int32_t SystemNative_CreateThread(uintptr_t stackSize, void *(*startAddress)(void*), void *parameter);
2626

2727
PALEXPORT int32_t SystemNative_SchedGetCpu(void);
2828

0 commit comments

Comments
 (0)