Add naming support to Win32 threads

This commit is contained in:
richardg867
2025-10-03 16:35:02 -03:00
committed by GitHub
parent e44dfd08f5
commit da018531e0

View File

@@ -35,11 +35,11 @@ typedef struct {
HANDLE handle;
} win_event_t;
/* For compatibility with thread.h, but Win32 does not allow named threads. */
thread_t *
thread_create_named(void (*func)(void *param), void *param, UNUSED(const char *name))
thread_create_named(void (*func)(void *param), void *param, const char *name)
{
uintptr_t bt = _beginthread(func, 0, param);
plat_set_thread_name((void *) bt, name);
return ((thread_t *) bt);
}