fix thread name bug in winpthread

This commit is contained in:
Asuka 2022-06-23 22:32:57 +08:00
parent 7c7bc81039
commit a264977cfa

View file

@ -1633,7 +1633,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, (unsigned int (__stdcall *)(void *))pthread_create_wrapper, tv, 0x4/*CREATE_SUSPEND*/, NULL);
thrd = (HANDLE) _beginthreadex(NULL, ssize, (unsigned int (__stdcall *)(void *))pthread_create_wrapper, tv, 0x4/*CREATE_SUSPEND*/, (unsigned int*)&tv->tid);
if (thrd == INVALID_HANDLE_VALUE)
thrd = 0;
/* Failed */