ostest/mutex: mut need to be destroyed
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
2234c3a2e6
commit
79a111fc1a
@ -156,6 +156,8 @@ void mutex_test(void)
|
|||||||
pthread_join(thread2, NULL);
|
pthread_join(thread2, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
pthread_mutex_destroy(&mut);
|
||||||
|
|
||||||
printf("\t\tThread1\tThread2\n");
|
printf("\t\tThread1\tThread2\n");
|
||||||
printf("\tLoops\t%lu\t%lu\n", nloops[0], nloops[1]);
|
printf("\tLoops\t%lu\t%lu\n", nloops[0], nloops[1]);
|
||||||
printf("\tErrors\t%lu\t%lu\n", nerrors[0], nerrors[1]);
|
printf("\tErrors\t%lu\t%lu\n", nerrors[0], nerrors[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user