From f00c973a6ab2a23573708568b8ef4acc20a9d36b Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 19 Jul 2024 08:50:28 +0300 Subject: [PATCH] fixed thread name on pthread_create --- src/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread.c b/src/thread.c index 391ba15..394cf78 100644 --- a/src/thread.c +++ b/src/thread.c @@ -1666,7 +1666,7 @@ pthread_create (pthread_t *th, const pthread_attr_t *attr, void *(* func)(void * /* Make sure tv->h has value of INVALID_HANDLE_VALUE */ _ReadWriteBarrier(); - thrd = (HANDLE) _beginthreadex(NULL, ssize, pthread_create_wrapper, tv, 0x4/*CREATE_SUSPEND*/, NULL); + thrd = (HANDLE) _beginthreadex(NULL, ssize, pthread_create_wrapper, tv, 0x4/*CREATE_SUSPEND*/, (unsigned int*)&tv->tid); if (thrd == INVALID_HANDLE_VALUE) thrd = 0; /* Failed */