More non-cppthreads build fixes
This commit is contained in:
@@ -783,7 +783,7 @@ plat_set_thread_name(void *thread, const char *name)
|
|||||||
if (!thread)
|
if (!thread)
|
||||||
pthread_setname_np(truncated);
|
pthread_setname_np(truncated);
|
||||||
# else
|
# else
|
||||||
pthread_setname_np(thread ? (pthread_t) thread : pthread_self(), truncated);
|
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1395,7 +1395,7 @@ plat_set_thread_name(void *thread, const char *name)
|
|||||||
if (!thread)
|
if (!thread)
|
||||||
pthread_setname_np(truncated);
|
pthread_setname_np(truncated);
|
||||||
#else
|
#else
|
||||||
pthread_setname_np(thread ? (pthread_t) thread : pthread_self(), truncated);
|
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ thread_wait(thread_t *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
event_t *
|
event_t *
|
||||||
thread_create_event()
|
thread_create_event(void)
|
||||||
{
|
{
|
||||||
event_pthread_t *event = malloc(sizeof(event_pthread_t));
|
event_pthread_t *event = malloc(sizeof(event_pthread_t));
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ thread_t *
|
|||||||
thread_create_named(void (*func)(void *param), void *param, const char *name)
|
thread_create_named(void (*func)(void *param), void *param, const char *name)
|
||||||
{
|
{
|
||||||
uintptr_t bt = _beginthread(func, 0, param);
|
uintptr_t bt = _beginthread(func, 0, param);
|
||||||
plat_set_thread_name(bt, name);
|
plat_set_thread_name((void *) bt, name);
|
||||||
return ((thread_t *) bt);
|
return ((thread_t *) bt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user