rework mutex test
authorLaurent MAZET <laurent.mazet@thalesgroup.com>
Thu, 2 Oct 2025 17:27:16 +0000 (19:27 +0200)
committerLaurent MAZET <laurent.mazet@thalesgroup.com>
Thu, 2 Oct 2025 17:27:16 +0000 (19:27 +0200)
mutex.c

diff --git a/mutex.c b/mutex.c
index 666fcb589f0a86c547d32edd828f0fe61fb87322..9d8a4881944bf9bfea2ea3982d6d27260fed2ec8 100644 (file)
--- a/mutex.c
+++ b/mutex.c
@@ -19,7 +19,6 @@ void (*usage_ext) (FILE *) = NULL;
 int (*parse_arg_ext) (char *) = NULL;
 
 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_mutex_t event = PTHREAD_MUTEX_INITIALIZER;
 volatile int shared_flag = 0;
 ts_t ts1, ts2;
 int try = 0;
@@ -106,7 +105,6 @@ int test (dts_t *buffer, int nb)
     pthread_join (taker_thread, NULL);
 
     pthread_mutex_destroy (&mutex);
-    pthread_mutex_destroy (&event);
 
     printf ("Too fast: %d\n", nbtoofast);