ostest/mutex: mut need to be destroyed

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5 2023-08-02 20:28:33 +08:00 committed by Xiang Xiao
parent 2234c3a2e6
commit 79a111fc1a

View File

@ -156,6 +156,8 @@ void mutex_test(void)
pthread_join(thread2, NULL);
#endif
pthread_mutex_destroy(&mut);
printf("\t\tThread1\tThread2\n");
printf("\tLoops\t%lu\t%lu\n", nloops[0], nloops[1]);
printf("\tErrors\t%lu\t%lu\n", nerrors[0], nerrors[1]);