ostest/cond_test: cond and mutex need to be destroyed

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2023-05-23 09:56:11 +08:00 committed by Xiang Xiao
parent ca4ff01cf9
commit 97a38b2b1f

View File

@ -348,6 +348,8 @@ void cond_test(void)
printf("cond_test: signaler terminated, now cancel the waiter\n");
pthread_detach(waiter);
pthread_cancel(waiter);
pthread_cond_destroy(&cond);
pthread_mutex_destroy(&mutex);
sem_destroy(&sem_thread_started);
printf("cond_test: \tWaiter\tSignaler\n");