瀏覽代碼

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

Nathalie Furmento 14 年之前
父節點
當前提交
848a14302c
共有 1 個文件被更改,包括 2 次插入2 次删除
  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
 #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;
 static unsigned finished = 0;