More non-cppthreads build fixes

This commit is contained in:
RichardG867
2024-01-09 20:28:10 -03:00
parent 30043d7b00
commit 02a1a8ec1b
4 changed files with 4 additions and 4 deletions

View File

@@ -783,7 +783,7 @@ plat_set_thread_name(void *thread, const char *name)
if (!thread)
pthread_setname_np(truncated);
# else
pthread_setname_np(thread ? (pthread_t) thread : pthread_self(), truncated);
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
# endif
#endif
}

View File

@@ -1395,7 +1395,7 @@ plat_set_thread_name(void *thread, const char *name)
if (!thread)
pthread_setname_np(truncated);
#else
pthread_setname_np(thread ? (pthread_t) thread : pthread_self(), truncated);
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
#endif
}

View File

@@ -52,7 +52,7 @@ thread_wait(thread_t *arg)
}
event_t *
thread_create_event()
thread_create_event(void)
{
event_pthread_t *event = malloc(sizeof(event_pthread_t));

View File

@@ -40,7 +40,7 @@ thread_t *
thread_create_named(void (*func)(void *param), void *param, const char *name)
{
uintptr_t bt = _beginthread(func, 0, param);
plat_set_thread_name(bt, name);
plat_set_thread_name((void *) bt, name);
return ((thread_t *) bt);
}