runtime: cast to the required type for pthread_key_create

This commit is contained in:
Yorick Hardy 2025-01-17 06:00:54 +02:00
parent 23301bfd1a
commit 9dc90531ee

View file

@ -7129,7 +7129,7 @@ void *Cyc_init_thread(object thread_and_thunk, int argc, object * args)
ck_pr_cas_int((int *)&(thd->thread_state), CYC_THREAD_STATE_NEW,
CYC_THREAD_STATE_RUNNABLE);
if (ck_pr_cas_int(&cyclone_thread_key_create, 1, 0)) {
int r = pthread_key_create(&cyclone_thread_key, Cyc_end_thread);
int r = pthread_key_create(&cyclone_thread_key, (void (*)(void *))Cyc_end_thread);
assert(r == 0);
}
pthread_setspecific(cyclone_thread_key, thd);