Explorar o código

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

Nathalie Furmento %!s(int64=14) %!d(string=hai) anos
pai
achega
848a14302c
Modificáronse 1 ficheiros con 2 adicións e 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;