Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: delete the tasks after using them
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 May 2010 17:44:12 +0000 (17:44 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 12 May 2010 17:44:12 +0000 (17:44 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7741 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/mc/centralized_mutex.c

index f6d11f8..ecb747f 100644 (file)
@@ -47,7 +47,7 @@ int coordinator(int argc, char*argv[]) {
        todo--;
       }
     }
        todo--;
       }
     }
-    //MSG_task_destoy(task);
+    MSG_task_destroy(task);
   }
   INFO0("Received all releases, quit now");
   return 0;
   }
   INFO0("Received all releases, quit now");
   return 0;
@@ -65,7 +65,7 @@ int client(int argc, char *argv[]) {
     // wait the answer
     m_task_t grant = NULL;
     MSG_task_receive(&grant,my_mailbox);
     // wait the answer
     m_task_t grant = NULL;
     MSG_task_receive(&grant,my_mailbox);
-    //MSG_task_destoy(grant);
+    MSG_task_destroy(grant);
     INFO0("got the answer. Sleep a bit and release it");
     MSG_process_sleep(1);
     MSG_task_send(MSG_task_create("release",0,1000,NULL),"coordinator");    
     INFO0("got the answer. Sleep a bit and release it");
     MSG_process_sleep(1);
     MSG_task_send(MSG_task_create("release",0,1000,NULL),"coordinator");