Skip to content
Snippets Groups Projects
Commit 36e0cfef authored by remi.greub's avatar remi.greub
Browse files

amélioration mutex

parent 27edef78
Branches
No related tags found
No related merge requests found
......@@ -108,7 +108,6 @@ int main(int argc, char **argv){
Civilians[i].num_thread = i;
Civilians[i].nb_trajet = 0;
Civilians[i].i_cities = (rand()%(Civilians[i].nbcities - 1))+1;
pthread_mutex_init(&mutex[i], NULL); //mutex par civilians
if(pthread_create(&threadCivilians[i], NULL, civilians, (void*)&Civilians[i])!=0){
perror("thread creation error");
return EXIT_FAILURE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment