Explicit cast to (struct pthread_internal_t *) to avoid warnings.