Forráskód Böngészése

Do not forget to initialize mutex and cond in this test

Cédric Augonnet 14 éve
szülő
commit
be79a67969
1 módosított fájl, 2 hozzáadás és 4 törlés
  1. 2 4
      tests/overlap/overlap.c

+ 2 - 4
tests/overlap/overlap.c

@@ -29,8 +29,8 @@
 
 
 #define SYMBOL	"sleep"
 #define SYMBOL	"sleep"
 
 
-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;
 static unsigned cnt = NTASKS;
 static unsigned cnt = NTASKS;
@@ -74,8 +74,6 @@ static char symbolname[128];
 
 
 int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
 {
-	//	unsigned i;
-
 	starpu_init(NULL);
 	starpu_init(NULL);
 
 
 	/* create data */
 	/* create data */