void* thread_func(void* param) { struct thread_data* data; data = (struct thread_data*) param; dfreerdp_run(data->instance); free(data); pthread_detach(pthread_self()); g_thread_count--; if (g_thread_count < 1) ReleaseSemaphore(g_sem, 1, NULL); return NULL; }
void* thread_func(void* param) { struct thread_data* data; data = (struct thread_data*) param; dfreerdp_run(data->instance); xfree(data); pthread_detach(pthread_self()); g_thread_count--; if (g_thread_count < 1) freerdp_sem_signal(g_sem); return NULL; }