void pthread_destroyjoin(FAR join_t *pjoin) { sdbg("pjoin=0x%p\n", pjoin); /* Remove the join info from the set of joins */ (void)pthread_removejoininfo((pid_t)pjoin->thread); /* Destroy its semaphores */ (void)sem_destroy(&pjoin->data_sem); (void)sem_destroy(&pjoin->exit_sem); /* And deallocate the pjoin structure */ sched_free(pjoin); }
void pthread_destroyjoin(FAR struct task_group_s *group, FAR struct join_s *pjoin) { sinfo("pjoin=0x%p\n", pjoin); /* Remove the join info from the set of joins */ pthread_removejoininfo(group, (pid_t)pjoin->thread); /* Destroy its semaphores */ (void)sem_destroy(&pjoin->data_sem); (void)sem_destroy(&pjoin->exit_sem); /* And deallocate the pjoin structure */ sched_kfree(pjoin); }