Explorar el Código

tests/core/execute_on_a_specific_worker.c: initialize mutex and cond variables

Nathalie Furmento hace 14 años
padre
commit
848a14302c
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      tests/core/execute_on_a_specific_worker.c

+ 2 - 2
tests/core/execute_on_a_specific_worker.c

@@ -26,8 +26,8 @@
 
 #define VECTORSIZE	1024
 
-static pthread_mutex_t mutex;
-static pthread_cond_t cond;
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
 
 static unsigned finished = 0;