Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
with ansi C the variables must be declared at the begining of the function
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 16 Mar 2007 15:11:01 +0000 (15:11 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 16 Mar 2007 15:11:01 +0000 (15:11 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3307 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/ping_pong.c

index c241c9a..ef92c54 100644 (file)
@@ -30,7 +30,7 @@ double task_comm_size_bw = 100000000;
 
 /** Emitter function  */
 int sender(int argc,char *argv[] )
 
 /** Emitter function  */
 int sender(int argc,char *argv[] )
-{INFO0("sender");
+{
   int nbr = 0;
   m_host_t *hosts = NULL; 
   int i;
   int nbr = 0;
   m_host_t *hosts = NULL; 
   int i;
@@ -38,6 +38,8 @@ int sender(int argc,char *argv[] )
   double task_comp_size = 0;
   m_task_t task=NULL;
   char sprintf_buffer[64];
   double task_comp_size = 0;
   m_task_t task=NULL;
   char sprintf_buffer[64];
+
+  INFO0("sender");
  
   nbr = argc - 1;
  hosts = calloc(nbr, sizeof(m_host_t));
  
   nbr = argc - 1;
  hosts = calloc(nbr, sizeof(m_host_t));
@@ -81,8 +83,10 @@ int sender(int argc,char *argv[] )
 /** Receiver function  */
 int receiver(int argc, char *argv[])
 {
 /** Receiver function  */
 int receiver(int argc, char *argv[])
 {
- INFO0("receiver");
+
   double communication_time=0;
   double communication_time=0;
+
+  INFO0("receiver");
   while(1) 
     {
       double time, time1, sender_time;
   while(1) 
     {
       double time, time1, sender_time;
@@ -119,8 +123,10 @@ int receiver(int argc, char *argv[])
 MSG_error_t test_all(const char *platform_file,
                            const char *application_file)
 {
 MSG_error_t test_all(const char *platform_file,
                            const char *application_file)
 {
-  INFO0("test_all");
-  MSG_error_t res = MSG_OK; 
+
+  MSG_error_t res = MSG_OK;
+
+  INFO0("test_all"); 
                                /*  Simulation setting */
     MSG_set_channel_number(MAX_CHANNEL);
     MSG_paje_output("msg_test.trace");
                                /*  Simulation setting */
     MSG_set_channel_number(MAX_CHANNEL);
     MSG_paje_output("msg_test.trace");