rt-tests: pi_stress: Move unlock into if block with matching lock
PATCH 1/1 rt-tests: pi_stress: Move unlock into if block with matching lock
Resolve unlocking a not locked mutex.
Issue reported by Valgrind's Helgrind tool.
Signed-off-by John B. Wyatt IV <[email protected]>
Signed-off-by John B. Wyatt IV <[email protected]>
--- src/pi_tests/pi_stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/pi_tests/pi_stress.c +1 -1
@@ -552,8 +552,8 @@ void *reporter(void *arg __attribute__ ((unused)))printf ("Current Inversions: %lu\n" ,total_inversions ()); } +pthread_mutex_unlock (&shutdown_mtx); } -pthread_mutex_unlock (&shutdown_mtx);/* if we specified a duration, see if it has expired */ if (end &&time (NULL ) > end) {
Signature · 1 line
2.46.0
Quoted 29 lines · John B. Wyatt IV
Resolve unlocking a not locked mutex.
Issue reported by Valgrind's Helgrind tool.
Signed-off-by John B. Wyatt IV <[email protected]>Signed-off-by John B. Wyatt IV <[email protected]>--- src/pi_tests/pi_stress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/pi_tests/pi_stress.c +1
-1@@ -552,8 +552,8 @@ void *reporter(void *arg __attribute__ ((unused)))printf ("Current Inversions: %lu\n" ,total_inversions ()); } +pthread_mutex_unlock (&shutdown_mtx); } -pthread_mutex_unlock (&shutdown_mtx);/* if we specified a duration, see if it has expired */ if (end &&time (NULL ) > end) {Signature · 1 line
2.46.0
Signed-off-by John Kacur <[email protected]>