Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s/TRY/TRYOLD/ I'd like to introduce a TRY macro in the exception mecanism, but this...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 2 Jul 2005 09:49:45 +0000 (09:49 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 2 Jul 2005 09:49:45 +0000 (09:49 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1541 48e7efb5-ca39-0410-a469-dd3cf9ba447f

16 files changed:
examples/amok/bandwidth/bandwidth.c
include/xbt/error.h
src/amok/Bandwidth/bandwidth.c
src/gras/DataDesc/ddt_exchange.c
src/gras/Msg/msg.c
src/gras/Transport/rl_transport.c
src/gras/Transport/sg_transport.c
src/gras/Transport/transport.c
src/gras/Transport/transport_plugin_buf.c
src/gras/Transport/transport_plugin_file.c
src/xbt/config.c
src/xbt/dict_cursor.c
src/xbt/dict_elm.c
src/xbt/dict_multi.c
testsuite/gras/datadesc_usage.c
testsuite/gras/mk_datadesc_structs.pl

index b231c72..f3e1a8a 100644 (file)
@@ -103,24 +103,24 @@ int maestro(int argc,char *argv[]) {
   }
 
   INFO0("Test the BW between me and one of the sensors");  
   }
 
   INFO0("Test the BW between me and one of the sensors");  
-  TRY(amok_bw_test(peer,buf_size,exp_size,msg_size,&sec,&bw));
+  TRYOLD(amok_bw_test(peer,buf_size,exp_size,msg_size,&sec,&bw));
   INFO6("Experience between me and %s:%d (%d kb in msgs of %d kb) took %f sec, achieving %f kb/s",
        argv[1],atoi(argv[2]),
        exp_size,msg_size,
        sec,bw);
 
   INFO0("Test the BW between the two sensors");  
   INFO6("Experience between me and %s:%d (%d kb in msgs of %d kb) took %f sec, achieving %f kb/s",
        argv[1],atoi(argv[2]),
        exp_size,msg_size,
        sec,bw);
 
   INFO0("Test the BW between the two sensors");  
-  TRY(amok_bw_request(argv[1],atoi(argv[2]),argv[3],atoi(argv[4]),
+  TRYOLD(amok_bw_request(argv[1],atoi(argv[2]),argv[3],atoi(argv[4]),
                       buf_size,exp_size,msg_size,&sec,&bw));   
   INFO2("Experience took took %f sec, achieving %f kb/s",
        sec,bw);
 
   /* ask sensors to quit */                    
   gras_msgtype_declare("quit",NULL);
                       buf_size,exp_size,msg_size,&sec,&bw));   
   INFO2("Experience took took %f sec, achieving %f kb/s",
        sec,bw);
 
   /* ask sensors to quit */                    
   gras_msgtype_declare("quit",NULL);
-  TRY(gras_msg_send(peer,gras_msgtype_by_name("quit"), NULL));
+  TRYOLD(gras_msg_send(peer,gras_msgtype_by_name("quit"), NULL));
   gras_socket_close(peer);
   gras_socket_close(peer);
-  TRY(gras_socket_client(argv[3],atoi(argv[4]),&peer));
-  TRY(gras_msg_send(peer,gras_msgtype_by_name("quit"), NULL));
+  TRYOLD(gras_socket_client(argv[3],atoi(argv[4]),&peer));
+  TRYOLD(gras_msg_send(peer,gras_msgtype_by_name("quit"), NULL));
   gras_socket_close(peer);
 
   gras_socket_close(g->sock);
   gras_socket_close(peer);
 
   gras_socket_close(g->sock);
index b8ea1f0..7ee0b89 100644 (file)
@@ -65,7 +65,7 @@ typedef enum {
 /** @brief return the error code if != no_error
  *  @hideinitializer
  */
 /** @brief return the error code if != no_error
  *  @hideinitializer
  */
-#define TRY(action) do {                                       \
+#define TRYOLD(action) do {                                       \
   if ((errcode=action) != no_error) {                          \
      ERROR1("'%s' error raising...", xbt_error_name(errcode)); \
      return errcode;                                           \
   if ((errcode=action) != no_error) {                          \
      ERROR1("'%s' error raising...", xbt_error_name(errcode)); \
      return errcode;                                           \
index 61b3d01..ae19bdb 100644 (file)
@@ -153,7 +153,7 @@ xbt_error_t amok_bw_test(gras_socket_t peer,
     ERROR1("Error %s encountered while sending the BW request.", xbt_error_name(errcode));
     return errcode;
   }
     ERROR1("Error %s encountered while sending the BW request.", xbt_error_name(errcode));
     return errcode;
   }
-  TRY(gras_socket_meas_accept(measMasterIn,&measIn));
+  TRYOLD(gras_socket_meas_accept(measMasterIn,&measIn));
 
   if ((errcode=gras_msg_wait(60,gras_msgtype_by_name("BW handshake ACK"),
                             NULL,&request_ack))) {
 
   if ((errcode=gras_msg_wait(60,gras_msgtype_by_name("BW handshake ACK"),
                             NULL,&request_ack))) {
@@ -174,8 +174,8 @@ xbt_error_t amok_bw_test(gras_socket_t peer,
   DEBUG1("Got ACK; conduct the experiment (msg_size=%ld)",request->msg_size);
 
   *sec=gras_os_time();
   DEBUG1("Got ACK; conduct the experiment (msg_size=%ld)",request->msg_size);
 
   *sec=gras_os_time();
-  TRY(gras_socket_meas_send(measOut,120,request->exp_size,request->msg_size));
-  TRY(gras_socket_meas_recv(measIn,120,1,1));
+  TRYOLD(gras_socket_meas_send(measOut,120,request->exp_size,request->msg_size));
+  TRYOLD(gras_socket_meas_recv(measIn,120,1,1));
 
   /*catch
     ERROR1("Error %s encountered while sending the BW experiment.",
 
   /*catch
     ERROR1("Error %s encountered while sending the BW experiment.",
@@ -256,12 +256,12 @@ int amok_bw_cb_bw_handshake(gras_socket_t  expeditor,
     /* FIXME: tell error to remote */
     return 1;
   }
     /* FIXME: tell error to remote */
     return 1;
   }
-  TRY(gras_socket_meas_accept(measMasterIn,&measIn));
+  TRYOLD(gras_socket_meas_accept(measMasterIn,&measIn));
   DEBUG4("BW handshake answered. buf_size=%lu exp_size=%lu msg_size=%lu port=%d",
        answer->buf_size,answer->exp_size,answer->msg_size,answer->host.port);
 
   DEBUG4("BW handshake answered. buf_size=%lu exp_size=%lu msg_size=%lu port=%d",
        answer->buf_size,answer->exp_size,answer->msg_size,answer->host.port);
 
-  TRY(gras_socket_meas_recv(measIn, 120,request->exp_size,request->msg_size));
-  TRY(gras_socket_meas_send(measOut,120,1,1));
+  TRYOLD(gras_socket_meas_recv(measIn, 120,request->exp_size,request->msg_size));
+  TRYOLD(gras_socket_meas_send(measOut,120,1,1));
 
   /*catch
     ERROR1("Error %s encountered while receiving the experiment.",
 
   /*catch
     ERROR1("Error %s encountered while receiving the experiment.",
@@ -324,11 +324,11 @@ xbt_error_t amok_bw_request(const char* from_name,unsigned int from_port,
   request->host.name = (char*)to_name;
   request->host.port = to_port;
 
   request->host.name = (char*)to_name;
   request->host.port = to_port;
 
-  TRY(gras_socket_client(from_name,from_port,&sock));
-  TRY(gras_msg_send(sock,gras_msgtype_by_name("BW request"),&request));
+  TRYOLD(gras_socket_client(from_name,from_port,&sock));
+  TRYOLD(gras_msg_send(sock,gras_msgtype_by_name("BW request"),&request));
   free(request);
 
   free(request);
 
-  TRY(gras_msg_wait(240,gras_msgtype_by_name("BW result"),NULL, &result));
+  TRYOLD(gras_msg_wait(240,gras_msgtype_by_name("BW result"),NULL, &result));
   
   *sec=result->sec;
   *bw =result->bw;
   
   *sec=result->sec;
   *bw =result->bw;
@@ -351,12 +351,12 @@ int amok_bw_cb_bw_request(gras_socket_t    expeditor,
   bw_res_t result = xbt_new0(s_bw_res,1);
   gras_socket_t peer;
 
   bw_res_t result = xbt_new0(s_bw_res,1);
   gras_socket_t peer;
 
-  TRY(gras_socket_client(request->host.name,request->host.port,&peer));
-  TRY(amok_bw_test(peer,
+  TRYOLD(gras_socket_client(request->host.name,request->host.port,&peer));
+  TRYOLD(amok_bw_test(peer,
                   request->buf_size,request->exp_size,request->msg_size,
                   &(result->sec),&(result->bw)));
 
                   request->buf_size,request->exp_size,request->msg_size,
                   &(result->sec),&(result->bw)));
 
-  TRY(gras_msg_send(expeditor,gras_msgtype_by_name("BW result"),&result));
+  TRYOLD(gras_msg_send(expeditor,gras_msgtype_by_name("BW result"),&result));
 
   gras_os_sleep(1);
   gras_socket_close(peer);
 
   gras_os_sleep(1);
   gras_socket_close(peer);
index bc64789..01eab9e 100644 (file)
@@ -54,15 +54,15 @@ gras_dd_recv_int(gras_socket_t sock, int r_arch, int *i) {
   }
 
   if (int_type->size[GRAS_THISARCH] >= int_type->size[r_arch]) {
   }
 
   if (int_type->size[GRAS_THISARCH] >= int_type->size[r_arch]) {
-    TRY(gras_trp_chunk_recv(sock, (char*)i, int_type->size[r_arch]));
+    TRYOLD(gras_trp_chunk_recv(sock, (char*)i, int_type->size[r_arch]));
     if (r_arch != GRAS_THISARCH)
     if (r_arch != GRAS_THISARCH)
-      TRY(gras_dd_convert_elm(int_type,1,r_arch, i,i));
+      TRYOLD(gras_dd_convert_elm(int_type,1,r_arch, i,i));
   } else {
     void *ptr = xbt_malloc(int_type->size[r_arch]);
 
   } else {
     void *ptr = xbt_malloc(int_type->size[r_arch]);
 
-    TRY(gras_trp_chunk_recv(sock, (char*)ptr, int_type->size[r_arch]));
+    TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, int_type->size[r_arch]));
     if (r_arch != GRAS_THISARCH)
     if (r_arch != GRAS_THISARCH)
-      TRY(gras_dd_convert_elm(int_type,1,r_arch, ptr,i));
+      TRYOLD(gras_dd_convert_elm(int_type,1,r_arch, ptr,i));
     free(ptr);
   }
   DEBUG1("recv_int(%d)",*i);
     free(ptr);
   }
   DEBUG1("recv_int(%d)",*i);
@@ -156,7 +156,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
 
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
 
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
-    TRY(gras_trp_chunk_send(sock, data, type->size[GRAS_THISARCH]));
+    TRYOLD(gras_trp_chunk_send(sock, data, type->size[GRAS_THISARCH]));
     break;
 
   case e_gras_datadesc_type_cat_struct: {
     break;
 
   case e_gras_datadesc_type_cat_struct: {
@@ -179,7 +179,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
        field->send(type,state,field_data);
       
       VERB1("Send field %s",field->name);
        field->send(type,state,field_data);
       
       VERB1("Send field %s",field->name);
-      TRY(gras_datadesc_send_rec(sock,state,refs,sub_type, field_data, 
+      TRYOLD(gras_datadesc_send_rec(sock,state,refs,sub_type, field_data, 
                                 detect_cycle || sub_type->cycle));
       
     }
                                 detect_cycle || sub_type->cycle));
       
     }
@@ -210,7 +210,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
                 type->name, field_num, xbt_dynar_length(union_data.fields));
 
     /* Send the field number */
                 type->name, field_num, xbt_dynar_length(union_data.fields));
 
     /* Send the field number */
-    TRY(gras_dd_send_int(sock, field_num));
+    TRYOLD(gras_dd_send_int(sock, field_num));
     
     /* Send the content */
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
     
     /* Send the content */
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
@@ -219,7 +219,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
     if (field->send)
       field->send(type,state,data);
     
     if (field->send)
       field->send(type,state,data);
     
-    TRY(gras_datadesc_send_rec(sock,state,refs, sub_type, data, 
+    TRYOLD(gras_datadesc_send_rec(sock,state,refs, sub_type, data, 
                               detect_cycle || sub_type->cycle));
           
     break;
                               detect_cycle || sub_type->cycle));
           
     break;
@@ -237,7 +237,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       sub_type = (*ref_data.selector)(type,state,data);
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       sub_type = (*ref_data.selector)(type,state,data);
-      TRY(gras_dd_send_int(sock, sub_type->code));
+      TRYOLD(gras_dd_send_int(sock, sub_type->code));
     }
     
     /* Send the actual value of the pointer for cycle handling */
     }
     
     /* Send the actual value of the pointer for cycle handling */
@@ -246,7 +246,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
       xbt_assert(pointer_type);
     }
      
       xbt_assert(pointer_type);
     }
      
-    TRY(gras_trp_chunk_send(sock, (char*)data,
+    TRYOLD(gras_trp_chunk_send(sock, (char*)data,
                            pointer_type->size[GRAS_THISARCH]));
     
     /* Send the pointed data only if not already sent */
                            pointer_type->size[GRAS_THISARCH]));
     
     /* Send the pointed data only if not already sent */
@@ -261,7 +261,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
        VERB1("Sending data referenced at %p", (void*)*ref);
        if (detect_cycle)
         xbt_dict_set_ext(refs, (char*)ref, sizeof(void*), ref, NULL);
        VERB1("Sending data referenced at %p", (void*)*ref);
        if (detect_cycle)
         xbt_dict_set_ext(refs, (char*)ref, sizeof(void*), ref, NULL);
-       TRY(gras_datadesc_send_rec(sock,state,refs, sub_type, *ref, 
+       TRYOLD(gras_datadesc_send_rec(sock,state,refs, sub_type, *ref, 
                                  detect_cycle || sub_type->cycle));
          
     } else if (errcode == no_error) {
                                  detect_cycle || sub_type->cycle));
          
     } else if (errcode == no_error) {
@@ -287,7 +287,7 @@ gras_datadesc_send_rec(gras_socket_t         sock,
       count = array_data.dynamic_size(type,state,data);
       xbt_assert1(count >=0,
                   "Invalid (negative) array size for type %s",type->name);
       count = array_data.dynamic_size(type,state,data);
       xbt_assert1(count >=0,
                   "Invalid (negative) array size for type %s",type->name);
-      TRY(gras_dd_send_int(sock, count));
+      TRYOLD(gras_dd_send_int(sock, count));
     }
     
     /* send the content */
     }
     
     /* send the content */
@@ -295,20 +295,20 @@ gras_datadesc_send_rec(gras_socket_t         sock,
     elm_size = sub_type->aligned_size[GRAS_THISARCH];
     if (sub_type->category_code == e_gras_datadesc_type_cat_scalar) {
       VERB1("Array of %ld scalars, send it in one shot",count);
     elm_size = sub_type->aligned_size[GRAS_THISARCH];
     if (sub_type->category_code == e_gras_datadesc_type_cat_scalar) {
       VERB1("Array of %ld scalars, send it in one shot",count);
-      TRY(gras_trp_chunk_send(sock, data, 
+      TRYOLD(gras_trp_chunk_send(sock, data, 
                              sub_type->aligned_size[GRAS_THISARCH] * count));
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
               sub_type->category.array_data.fixed_size > 0 &&
               sub_type->category.array_data.type->category_code == e_gras_datadesc_type_cat_scalar) {
        
       VERB1("Array of %ld fixed array of scalars, send it in one shot",count);
                              sub_type->aligned_size[GRAS_THISARCH] * count));
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
               sub_type->category.array_data.fixed_size > 0 &&
               sub_type->category.array_data.type->category_code == e_gras_datadesc_type_cat_scalar) {
        
       VERB1("Array of %ld fixed array of scalars, send it in one shot",count);
-      TRY(gras_trp_chunk_send(sock, data, 
+      TRYOLD(gras_trp_chunk_send(sock, data, 
                              sub_type->category.array_data.type->aligned_size[GRAS_THISARCH] 
                                 * count * sub_type->category.array_data.fixed_size));
        
     } else {
       for (cpt=0; cpt<count; cpt++) {
                              sub_type->category.array_data.type->aligned_size[GRAS_THISARCH] 
                                 * count * sub_type->category.array_data.fixed_size));
        
     } else {
       for (cpt=0; cpt<count; cpt++) {
-       TRY(gras_datadesc_send_rec(sock,state,refs, sub_type, ptr, 
+       TRYOLD(gras_datadesc_send_rec(sock,state,refs, sub_type, ptr, 
                                   detect_cycle || sub_type->cycle));
        ptr += elm_size;
       }
                                   detect_cycle || sub_type->cycle));
        ptr += elm_size;
       }
@@ -384,15 +384,15 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
     if (type->size[GRAS_THISARCH] == type->size[r_arch]) {
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
     if (type->size[GRAS_THISARCH] == type->size[r_arch]) {
-      TRY(gras_trp_chunk_recv(sock, (char*)l_data, type->size[r_arch]));
+      TRYOLD(gras_trp_chunk_recv(sock, (char*)l_data, type->size[r_arch]));
       if (r_arch != GRAS_THISARCH)
       if (r_arch != GRAS_THISARCH)
-       TRY(gras_dd_convert_elm(type,1,r_arch, l_data,l_data));
+       TRYOLD(gras_dd_convert_elm(type,1,r_arch, l_data,l_data));
     } else {
       void *ptr = xbt_malloc(type->size[r_arch]);
 
     } else {
       void *ptr = xbt_malloc(type->size[r_arch]);
 
-      TRY(gras_trp_chunk_recv(sock, (char*)ptr, type->size[r_arch]));
+      TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, type->size[r_arch]));
       if (r_arch != GRAS_THISARCH)
       if (r_arch != GRAS_THISARCH)
-       TRY(gras_dd_convert_elm(type,1,r_arch, ptr,l_data));
+       TRYOLD(gras_dd_convert_elm(type,1,r_arch, ptr,l_data));
       free(ptr);
     }
     break;
       free(ptr);
     }
     break;
@@ -412,7 +412,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
 
       sub_type = field->type;
 
 
       sub_type = field->type;
 
-      TRY(gras_datadesc_recv_rec(sock,state,refs, sub_type,
+      TRYOLD(gras_datadesc_recv_rec(sock,state,refs, sub_type,
                                 r_arch,NULL,0,
                                 field_data,-1, 
                                 detect_cycle || sub_type->cycle));
                                 r_arch,NULL,0,
                                 field_data,-1, 
                                 detect_cycle || sub_type->cycle));
@@ -437,7 +437,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
                "Please call gras_datadesc_declare_union_close on %s before receiving it",
                type->name);
     /* retrieve the field number */
                "Please call gras_datadesc_declare_union_close on %s before receiving it",
                type->name);
     /* retrieve the field number */
-    TRY(gras_dd_recv_int(sock, r_arch, &field_num));
+    TRYOLD(gras_dd_recv_int(sock, r_arch, &field_num));
     if (field_num < 0)
       RAISE1(mismatch_error,
             "Received union field for %s is negative", type->name);
     if (field_num < 0)
       RAISE1(mismatch_error,
             "Received union field for %s is negative", type->name);
@@ -450,7 +450,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
     sub_type = field->type;
     
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
     sub_type = field->type;
     
-    TRY(gras_datadesc_recv_rec(sock,state,refs, sub_type,
+    TRYOLD(gras_datadesc_recv_rec(sock,state,refs, sub_type,
                               r_arch,NULL,0,
                               l_data,-1,
                               detect_cycle || sub_type->cycle));
                               r_arch,NULL,0,
                               l_data,-1,
                               detect_cycle || sub_type->cycle));
@@ -471,8 +471,8 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       int ref_code;
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       int ref_code;
-      TRY(gras_dd_recv_int(sock, r_arch, &ref_code));
-      TRY(gras_datadesc_by_id(ref_code, &sub_type));
+      TRYOLD(gras_dd_recv_int(sock, r_arch, &ref_code));
+      TRYOLD(gras_datadesc_by_id(ref_code, &sub_type));
     }
 
     /* Get the actual value of the pointer for cycle handling */
     }
 
     /* Get the actual value of the pointer for cycle handling */
@@ -483,7 +483,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
 
     r_ref = xbt_malloc(pointer_type->size[r_arch]);
 
 
     r_ref = xbt_malloc(pointer_type->size[r_arch]);
 
-    TRY(gras_trp_chunk_recv(sock, (char*)r_ref,
+    TRYOLD(gras_trp_chunk_recv(sock, (char*)r_ref,
                            pointer_type->size[r_arch]));
 
     /* Receive the pointed data only if not already sent */
                            pointer_type->size[r_arch]));
 
     /* Receive the pointed data only if not already sent */
@@ -515,24 +515,24 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
 
        subsubcount = array_data.fixed_size;
        if (subsubcount == 0)
 
        subsubcount = array_data.fixed_size;
        if (subsubcount == 0)
-         TRY(gras_dd_recv_int(sock, r_arch, &subsubcount));
+         TRYOLD(gras_dd_recv_int(sock, r_arch, &subsubcount));
 
        subsub_type = array_data.type;
 
 
 
        subsub_type = array_data.type;
 
 
-       TRY(gras_dd_alloc_ref(refs,
+       TRYOLD(gras_dd_alloc_ref(refs,
                              subsub_type->size[GRAS_THISARCH] * subsubcount, 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       } else {
                              subsub_type->size[GRAS_THISARCH] * subsubcount, 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       } else {
-       TRY(gras_dd_alloc_ref(refs,sub_type->size[GRAS_THISARCH], 
+       TRYOLD(gras_dd_alloc_ref(refs,sub_type->size[GRAS_THISARCH], 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       }
 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       }
 
-      TRY(gras_datadesc_recv_rec(sock,state,refs, sub_type,
+      TRYOLD(gras_datadesc_recv_rec(sock,state,refs, sub_type,
                                 r_arch,r_ref,pointer_type->size[r_arch],
                                 (char*)l_referenced, subsubcount,
                                 detect_cycle || sub_type->cycle));
                                 r_arch,r_ref,pointer_type->size[r_arch],
                                 (char*)l_referenced, subsubcount,
                                 detect_cycle || sub_type->cycle));
@@ -566,7 +566,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
     if (count == 0)
       count = subsize;
     if (count == 0)
     if (count == 0)
       count = subsize;
     if (count == 0)
-      TRY(gras_dd_recv_int(sock, r_arch, &count));
+      TRYOLD(gras_dd_recv_int(sock, r_arch, &count));
     if (count == 0)
       RAISE1(mismatch_error,
             "Invalid (=0) array size for type %s",type->name);
     if (count == 0)
       RAISE1(mismatch_error,
             "Invalid (=0) array size for type %s",type->name);
@@ -577,17 +577,17 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
       VERB1("Array of %d scalars, get it in one shoot", count);
       if (sub_type->aligned_size[GRAS_THISARCH] >= 
          sub_type->aligned_size[r_arch]) {
       VERB1("Array of %d scalars, get it in one shoot", count);
       if (sub_type->aligned_size[GRAS_THISARCH] >= 
          sub_type->aligned_size[r_arch]) {
-       TRY(gras_trp_chunk_recv(sock, (char*)l_data, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)l_data, 
                                sub_type->aligned_size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
                                sub_type->aligned_size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(sub_type,count,r_arch, l_data,l_data));
+         TRYOLD(gras_dd_convert_elm(sub_type,count,r_arch, l_data,l_data));
       } else {
        ptr = xbt_malloc(sub_type->aligned_size[r_arch] * count);
 
       } else {
        ptr = xbt_malloc(sub_type->aligned_size[r_arch] * count);
 
-       TRY(gras_trp_chunk_recv(sock, (char*)ptr, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, 
                                sub_type->size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
                                sub_type->size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(sub_type,count,r_arch, ptr,l_data));
+         TRYOLD(gras_dd_convert_elm(sub_type,count,r_arch, ptr,l_data));
        free(ptr);
       }
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
        free(ptr);
       }
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
@@ -600,18 +600,18 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
       VERB1("Array of %d fixed array of scalars, get it in one shot",count);
       if (subsub_type->aligned_size[GRAS_THISARCH] >= 
          subsub_type->aligned_size[r_arch]) {
       VERB1("Array of %d fixed array of scalars, get it in one shot",count);
       if (subsub_type->aligned_size[GRAS_THISARCH] >= 
          subsub_type->aligned_size[r_arch]) {
-       TRY(gras_trp_chunk_recv(sock, (char*)l_data, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)l_data, 
                                subsub_type->aligned_size[r_arch] * count * 
                                  array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
                                subsub_type->aligned_size[r_arch] * count * 
                                  array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, l_data,l_data));
+         TRYOLD(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, l_data,l_data));
       } else {
        ptr = xbt_malloc(subsub_type->aligned_size[r_arch] * count*array_data.fixed_size);
 
       } else {
        ptr = xbt_malloc(subsub_type->aligned_size[r_arch] * count*array_data.fixed_size);
 
-       TRY(gras_trp_chunk_recv(sock, (char*)ptr, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, 
                                subsub_type->size[r_arch] * count*array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
                                subsub_type->size[r_arch] * count*array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, ptr,l_data));
+         TRYOLD(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, ptr,l_data));
        free(ptr);
       }
       
        free(ptr);
       }
       
@@ -623,7 +623,7 @@ gras_datadesc_recv_rec(gras_socket_t         sock,
 
       ptr = l_data;
       for (cpt=0; cpt<count; cpt++) {
 
       ptr = l_data;
       for (cpt=0; cpt<count; cpt++) {
-       TRY(gras_datadesc_recv_rec(sock,state,refs, sub_type,
+       TRYOLD(gras_datadesc_recv_rec(sock,state,refs, sub_type,
                                   r_arch, NULL, 0, ptr,-1,
                                   detect_cycle || sub_type->cycle));
                                   
                                   r_arch, NULL, 0, ptr,-1,
                                   detect_cycle || sub_type->cycle));
                                   
@@ -704,7 +704,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
 
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
 
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
-    printf("  TRY(gras_trp_chunk_send(sock, data, %lu));\n",type->size[GRAS_THISARCH]);
+    printf("  TRYOLD(gras_trp_chunk_send(sock, data, %lu));\n",type->size[GRAS_THISARCH]);
     break;
 
   case e_gras_datadesc_type_cat_struct: {
     break;
 
   case e_gras_datadesc_type_cat_struct: {
@@ -727,7 +727,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
       
       printf("  VERB1(\"Send field %s\");\n",field->name);
       printf("  data += %lu;\n",field->offset[GRAS_THISARCH]);
       
       printf("  VERB1(\"Send field %s\");\n",field->name);
       printf("  data += %lu;\n",field->offset[GRAS_THISARCH]);
-      TRY(gras_datadesc_gen_send_rec(sock,state,refs,sub_type, field_data, 
+      TRYOLD(gras_datadesc_gen_send_rec(sock,state,refs,sub_type, field_data, 
                                     detect_cycle || sub_type->cycle));
       printf("  data -= %lu;\n",field->offset[GRAS_THISARCH]);
       
                                     detect_cycle || sub_type->cycle));
       printf("  data -= %lu;\n",field->offset[GRAS_THISARCH]);
       
@@ -759,7 +759,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
                 type->name, xbt_dynar_length(union_data.fields));
 
     /* Send the field number */
                 type->name, xbt_dynar_length(union_data.fields));
 
     /* Send the field number */
-    printf("TRY(gras_dd_send_int(sock, field_num));\n");
+    printf("TRYOLD(gras_dd_send_int(sock, field_num));\n");
     
     /* Send the content */
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
     
     /* Send the content */
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
@@ -768,7 +768,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
     if (field->send)
       field->send(state,data);
     
     if (field->send)
       field->send(state,data);
     
-    TRY(gras_datadesc_gen_send_rec(sock,state,refs, sub_type, data,
+    TRYOLD(gras_datadesc_gen_send_rec(sock,state,refs, sub_type, data,
                                   detect_cycle || sub_type->cycle));
            
     break;
                                   detect_cycle || sub_type->cycle));
            
     break;
@@ -786,7 +786,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       sub_type = (*ref_data.selector)(state,data);
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       sub_type = (*ref_data.selector)(state,data);
-      TRY(gras_dd_send_int(sock, sub_type->code));
+      TRYOLD(gras_dd_send_int(sock, sub_type->code));
     }
     
     /* Send the actual value of the pointer for cycle handling */
     }
     
     /* Send the actual value of the pointer for cycle handling */
@@ -795,7 +795,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
       xbt_assert(pointer_type);
     }
      
       xbt_assert(pointer_type);
     }
      
-    TRY(gras_trp_chunk_send(sock, (char*)data,
+    TRYOLD(gras_trp_chunk_send(sock, (char*)data,
                            pointer_type->size[GRAS_THISARCH]));
     
     /* Send the pointed data only if not already sent */
                            pointer_type->size[GRAS_THISARCH]));
     
     /* Send the pointed data only if not already sent */
@@ -810,7 +810,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
        VERB1("Sending data referenced at %p", (void*)*ref);
        if (detect_cycle)
         xbt_dict_set_ext(refs, (char*)ref, sizeof(void*), ref, NULL);
        VERB1("Sending data referenced at %p", (void*)*ref);
        if (detect_cycle)
         xbt_dict_set_ext(refs, (char*)ref, sizeof(void*), ref, NULL);
-       TRY(gras_datadesc_gen_send_rec(sock,state,refs, sub_type, *ref, 
+       TRYOLD(gras_datadesc_gen_send_rec(sock,state,refs, sub_type, *ref, 
                                      detect_cycle || sub_type->cycle));
          
     } else if (errcode == no_error) {
                                      detect_cycle || sub_type->cycle));
          
     } else if (errcode == no_error) {
@@ -836,7 +836,7 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
       count = array_data.dynamic_size(state,data);
       xbt_assert1(count >=0,
                   "Invalid (negative) array size for type %s",type->name);
       count = array_data.dynamic_size(state,data);
       xbt_assert1(count >=0,
                   "Invalid (negative) array size for type %s",type->name);
-      TRY(gras_dd_send_int(sock, count));
+      TRYOLD(gras_dd_send_int(sock, count));
     }
     
     /* send the content */
     }
     
     /* send the content */
@@ -844,20 +844,20 @@ gras_datadesc_gen_send_rec(gras_socket_t         sock,
     elm_size = sub_type->aligned_size[GRAS_THISARCH];
     if (sub_type->category_code == e_gras_datadesc_type_cat_scalar) {
       VERB1("Array of %ld scalars, send it in one shot",count);
     elm_size = sub_type->aligned_size[GRAS_THISARCH];
     if (sub_type->category_code == e_gras_datadesc_type_cat_scalar) {
       VERB1("Array of %ld scalars, send it in one shot",count);
-      TRY(gras_trp_chunk_send(sock, data, 
+      TRYOLD(gras_trp_chunk_send(sock, data, 
                              sub_type->aligned_size[GRAS_THISARCH] * count));
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
               sub_type->category.array_data.fixed_size > 0 &&
               sub_type->category.array_data.type->category_code == e_gras_datadesc_type_cat_scalar) {
        
       VERB1("Array of %ld fixed array of scalars, send it in one shot",count);
                              sub_type->aligned_size[GRAS_THISARCH] * count));
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
               sub_type->category.array_data.fixed_size > 0 &&
               sub_type->category.array_data.type->category_code == e_gras_datadesc_type_cat_scalar) {
        
       VERB1("Array of %ld fixed array of scalars, send it in one shot",count);
-      TRY(gras_trp_chunk_send(sock, data, 
+      TRYOLD(gras_trp_chunk_send(sock, data, 
                              sub_type->category.array_data.type->aligned_size[GRAS_THISARCH] 
                                 * count * sub_type->category.array_data.fixed_size));
        
     } else {
       for (cpt=0; cpt<count; cpt++) {
                              sub_type->category.array_data.type->aligned_size[GRAS_THISARCH] 
                                 * count * sub_type->category.array_data.fixed_size));
        
     } else {
       for (cpt=0; cpt<count; cpt++) {
-       TRY(gras_datadesc_gen_send_rec(sock,state,refs, sub_type, ptr, 
+       TRYOLD(gras_datadesc_gen_send_rec(sock,state,refs, sub_type, ptr, 
                                       detect_cycle || sub_type->cycle));
        ptr += elm_size;
       }
                                       detect_cycle || sub_type->cycle));
        ptr += elm_size;
       }
@@ -935,15 +935,15 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
     if (type->size[GRAS_THISARCH] == type->size[r_arch]) {
   switch (type->category_code) {
   case e_gras_datadesc_type_cat_scalar:
     if (type->size[GRAS_THISARCH] == type->size[r_arch]) {
-      TRY(gras_trp_chunk_recv(sock, (char*)l_data, type->size[r_arch]));
+      TRYOLD(gras_trp_chunk_recv(sock, (char*)l_data, type->size[r_arch]));
       if (r_arch != GRAS_THISARCH)
       if (r_arch != GRAS_THISARCH)
-       TRY(gras_dd_convert_elm(type,1,r_arch, l_data,l_data));
+       TRYOLD(gras_dd_convert_elm(type,1,r_arch, l_data,l_data));
     } else {
       void *ptr = xbt_malloc(type->size[r_arch]);
 
     } else {
       void *ptr = xbt_malloc(type->size[r_arch]);
 
-      TRY(gras_trp_chunk_recv(sock, (char*)ptr, type->size[r_arch]));
+      TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, type->size[r_arch]));
       if (r_arch != GRAS_THISARCH)
       if (r_arch != GRAS_THISARCH)
-       TRY(gras_dd_convert_elm(type,1,r_arch, ptr,l_data));
+       TRYOLD(gras_dd_convert_elm(type,1,r_arch, ptr,l_data));
       free(ptr);
     }
     break;
       free(ptr);
     }
     break;
@@ -963,7 +963,7 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
 
       sub_type = field->type;
 
 
       sub_type = field->type;
 
-      TRY(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
+      TRYOLD(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
                                     r_arch,NULL,0,
                                     field_data,-1,
                                     detect_cycle || sub_type->cycle));
                                     r_arch,NULL,0,
                                     field_data,-1,
                                     detect_cycle || sub_type->cycle));
@@ -987,7 +987,7 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
                "Please call gras_datadesc_declare_union_close on %s before receiving it",
                type->name);
     /* retrieve the field number */
                "Please call gras_datadesc_declare_union_close on %s before receiving it",
                type->name);
     /* retrieve the field number */
-    TRY(gras_dd_recv_int(sock, r_arch, &field_num));
+    TRYOLD(gras_dd_recv_int(sock, r_arch, &field_num));
     if (field_num < 0)
       RAISE1(mismatch_error,
             "Received union field for %s is negative", type->name);
     if (field_num < 0)
       RAISE1(mismatch_error,
             "Received union field for %s is negative", type->name);
@@ -1000,7 +1000,7 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
     sub_type = field->type;
     
     field = xbt_dynar_get_as(union_data.fields, field_num, gras_dd_cat_field_t);
     sub_type = field->type;
     
-    TRY(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
+    TRYOLD(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
                                   r_arch,NULL,0,
                                   l_data,-1,
                                   detect_cycle || sub_type->cycle));
                                   r_arch,NULL,0,
                                   l_data,-1,
                                   detect_cycle || sub_type->cycle));
@@ -1021,8 +1021,8 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       int ref_code;
     sub_type = ref_data.type;
     if (sub_type == NULL) {
       int ref_code;
-      TRY(gras_dd_recv_int(sock, r_arch, &ref_code));
-      TRY(gras_datadesc_by_id(ref_code, &sub_type));
+      TRYOLD(gras_dd_recv_int(sock, r_arch, &ref_code));
+      TRYOLD(gras_datadesc_by_id(ref_code, &sub_type));
     }
 
     /* Get the actual value of the pointer for cycle handling */
     }
 
     /* Get the actual value of the pointer for cycle handling */
@@ -1033,7 +1033,7 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
 
     r_ref = xbt_malloc(pointer_type->size[r_arch]);
 
 
     r_ref = xbt_malloc(pointer_type->size[r_arch]);
 
-    TRY(gras_trp_chunk_recv(sock, (char*)r_ref,
+    TRYOLD(gras_trp_chunk_recv(sock, (char*)r_ref,
                            pointer_type->size[r_arch]));
 
     /* Receive the pointed data only if not already sent */
                            pointer_type->size[r_arch]));
 
     /* Receive the pointed data only if not already sent */
@@ -1065,24 +1065,24 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
 
        subsubcount = array_data.fixed_size;
        if (subsubcount == 0)
 
        subsubcount = array_data.fixed_size;
        if (subsubcount == 0)
-         TRY(gras_dd_recv_int(sock, r_arch, &subsubcount));
+         TRYOLD(gras_dd_recv_int(sock, r_arch, &subsubcount));
 
        subsub_type = array_data.type;
 
 
 
        subsub_type = array_data.type;
 
 
-       TRY(gras_dd_alloc_ref(refs,
+       TRYOLD(gras_dd_alloc_ref(refs,
                              subsub_type->size[GRAS_THISARCH] * subsubcount, 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       } else {
                              subsub_type->size[GRAS_THISARCH] * subsubcount, 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       } else {
-       TRY(gras_dd_alloc_ref(refs,sub_type->size[GRAS_THISARCH], 
+       TRYOLD(gras_dd_alloc_ref(refs,sub_type->size[GRAS_THISARCH], 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       }
 
                              r_ref,pointer_type->size[r_arch], 
                              (char**)&l_referenced,
                              detect_cycle));
       }
 
-      TRY(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
+      TRYOLD(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
                                     r_arch,r_ref,pointer_type->size[r_arch],
                                     (char*)l_referenced, subsubcount,
                                     detect_cycle || sub_type->cycle));
                                     r_arch,r_ref,pointer_type->size[r_arch],
                                     (char*)l_referenced, subsubcount,
                                     detect_cycle || sub_type->cycle));
@@ -1116,7 +1116,7 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
     if (count == 0)
       count = subsize;
     if (count == 0)
     if (count == 0)
       count = subsize;
     if (count == 0)
-      TRY(gras_dd_recv_int(sock, r_arch, &count));
+      TRYOLD(gras_dd_recv_int(sock, r_arch, &count));
     if (count == 0)
       RAISE1(mismatch_error,
             "Invalid (=0) array size for type %s",type->name);
     if (count == 0)
       RAISE1(mismatch_error,
             "Invalid (=0) array size for type %s",type->name);
@@ -1127,17 +1127,17 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
       VERB1("Array of %d scalars, get it in one shoot", count);
       if (sub_type->aligned_size[GRAS_THISARCH] >= 
          sub_type->aligned_size[r_arch]) {
       VERB1("Array of %d scalars, get it in one shoot", count);
       if (sub_type->aligned_size[GRAS_THISARCH] >= 
          sub_type->aligned_size[r_arch]) {
-       TRY(gras_trp_chunk_recv(sock, (char*)l_data, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)l_data, 
                                sub_type->aligned_size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
                                sub_type->aligned_size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(sub_type,count,r_arch, l_data,l_data));
+         TRYOLD(gras_dd_convert_elm(sub_type,count,r_arch, l_data,l_data));
       } else {
        ptr = xbt_malloc(sub_type->aligned_size[r_arch] * count);
 
       } else {
        ptr = xbt_malloc(sub_type->aligned_size[r_arch] * count);
 
-       TRY(gras_trp_chunk_recv(sock, (char*)ptr, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, 
                                sub_type->size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
                                sub_type->size[r_arch] * count));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(sub_type,count,r_arch, ptr,l_data));
+         TRYOLD(gras_dd_convert_elm(sub_type,count,r_arch, ptr,l_data));
        free(ptr);
       }
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
        free(ptr);
       }
     } else if (sub_type->category_code == e_gras_datadesc_type_cat_array &&
@@ -1150,18 +1150,18 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
       VERB1("Array of %d fixed array of scalars, get it in one shot",count);
       if (subsub_type->aligned_size[GRAS_THISARCH] >= 
          subsub_type->aligned_size[r_arch]) {
       VERB1("Array of %d fixed array of scalars, get it in one shot",count);
       if (subsub_type->aligned_size[GRAS_THISARCH] >= 
          subsub_type->aligned_size[r_arch]) {
-       TRY(gras_trp_chunk_recv(sock, (char*)l_data, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)l_data, 
                                subsub_type->aligned_size[r_arch] * count * 
                                  array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
                                subsub_type->aligned_size[r_arch] * count * 
                                  array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, l_data,l_data));
+         TRYOLD(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, l_data,l_data));
       } else {
        ptr = xbt_malloc(subsub_type->aligned_size[r_arch] * count*array_data.fixed_size);
 
       } else {
        ptr = xbt_malloc(subsub_type->aligned_size[r_arch] * count*array_data.fixed_size);
 
-       TRY(gras_trp_chunk_recv(sock, (char*)ptr, 
+       TRYOLD(gras_trp_chunk_recv(sock, (char*)ptr, 
                                subsub_type->size[r_arch] * count*array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
                                subsub_type->size[r_arch] * count*array_data.fixed_size));
        if (r_arch != GRAS_THISARCH)
-         TRY(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, ptr,l_data));
+         TRYOLD(gras_dd_convert_elm(subsub_type,count*array_data.fixed_size,r_arch, ptr,l_data));
        free(ptr);
       }
       
        free(ptr);
       }
       
@@ -1173,7 +1173,7 @@ gras_datadesc_gen_recv_rec(gras_socket_t         sock,
 
       ptr = l_data;
       for (cpt=0; cpt<count; cpt++) {
 
       ptr = l_data;
       for (cpt=0; cpt<count; cpt++) {
-       TRY(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
+       TRYOLD(gras_datadesc_gen_recv_rec(sock,state,refs, sub_type,
                                       r_arch, NULL, 0, ptr,-1,
                                       detect_cycle || sub_type->cycle));
                                      
                                       r_arch, NULL, 0, ptr,-1,
                                       detect_cycle || sub_type->cycle));
                                      
index ce2161b..c37b634 100644 (file)
@@ -216,12 +216,12 @@ gras_msg_send(gras_socket_t   sock,
 
   DEBUG3("send '%s' to %s:%d", msgtype->name, 
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
 
   DEBUG3("send '%s' to %s:%d", msgtype->name, 
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
-  TRY(gras_trp_chunk_send(sock, GRAS_header, 6));
+  TRYOLD(gras_trp_chunk_send(sock, GRAS_header, 6));
 
 
-  TRY(gras_datadesc_send(sock, string_type,   &msgtype->name));
+  TRYOLD(gras_datadesc_send(sock, string_type,   &msgtype->name));
   if (msgtype->ctn_type)
   if (msgtype->ctn_type)
-    TRY(gras_datadesc_send(sock, msgtype->ctn_type, payload));
-  TRY(gras_trp_flush(sock));
+    TRYOLD(gras_datadesc_send(sock, msgtype->ctn_type, payload));
+  TRYOLD(gras_trp_flush(sock));
 
   return no_error;
 }
 
   return no_error;
 }
@@ -262,7 +262,7 @@ gras_msg_recv(gras_socket_t    sock,
   DEBUG2("Handle an incoming message using protocol %d (remote is %s)",
         (int)header[4],gras_datadesc_arch_name(r_arch));
 
   DEBUG2("Handle an incoming message using protocol %d (remote is %s)",
         (int)header[4],gras_datadesc_arch_name(r_arch));
 
-  TRY(gras_datadesc_recv(sock, string_type, r_arch, &msg_name));
+  TRYOLD(gras_datadesc_recv(sock, string_type, r_arch, &msg_name));
   errcode = xbt_set_get_by_name(_gras_msgtype_set,
                                 msg_name,(xbt_set_elm_t*)msgtype);
   if (errcode != no_error)
   errcode = xbt_set_get_by_name(_gras_msgtype_set,
                                 msg_name,(xbt_set_elm_t*)msgtype);
   if (errcode != no_error)
@@ -279,7 +279,7 @@ gras_msg_recv(gras_socket_t    sock,
                "Dynamic array as payload is forbided for now (FIXME?).",
                "Reference to dynamic array is allowed.");
     *payload = xbt_malloc(*payload_size);
                "Dynamic array as payload is forbided for now (FIXME?).",
                "Reference to dynamic array is allowed.");
     *payload = xbt_malloc(*payload_size);
-    TRY(gras_datadesc_recv(sock, (*msgtype)->ctn_type, r_arch, *payload));
+    TRYOLD(gras_datadesc_recv(sock, (*msgtype)->ctn_type, r_arch, *payload));
   } else {
     *payload = NULL;
     *payload_size = 0;
   } else {
     *payload = NULL;
     *payload_size = 0;
@@ -337,8 +337,8 @@ gras_msg_wait(double           timeout,
   }
 
   while (1) {
   }
 
   while (1) {
-    TRY(gras_trp_select(timeout - now + start, &expeditor_res));
-    TRY(gras_msg_recv(expeditor_res, &msgt_got, &payload_got, &payload_size_got));
+    TRYOLD(gras_trp_select(timeout - now + start, &expeditor_res));
+    TRYOLD(gras_msg_recv(expeditor_res, &msgt_got, &payload_got, &payload_size_got));
     if (msgt_got->code == msgt_want->code) {
       if (expeditor)
        *expeditor=expeditor_res;
     if (msgt_got->code == msgt_want->code) {
       if (expeditor)
        *expeditor=expeditor_res;
index b4d23e1..2449601 100644 (file)
@@ -158,7 +158,7 @@ gras_trp_select(double timeout,
         /* not a socket but an ear. accept on it and serve next socket */
         gras_socket_t accepted=NULL;
         
         /* not a socket but an ear. accept on it and serve next socket */
         gras_socket_t accepted=NULL;
         
-        TRY((sock_iter->plugin->socket_accept)(sock_iter,&accepted));
+        TRYOLD((sock_iter->plugin->socket_accept)(sock_iter,&accepted));
         DEBUG2("accepted=%p,&accepted=%p",accepted,&accepted);
         accepted->meas = sock_iter->meas;
        } else {
         DEBUG2("accepted=%p,&accepted=%p",accepted,&accepted);
         accepted->meas = sock_iter->meas;
        } else {
index 1ccc83d..4448111 100644 (file)
@@ -48,7 +48,7 @@ gras_trp_select(double timeout,
         MSG_host_get_name(MSG_host_self()),
         timeout);
 
         MSG_host_get_name(MSG_host_self()),
         timeout);
 
-  TRY(MSG_channel_select_from((m_channel_t) pd->chan, timeout, &r_pid));
+  TRYOLD(MSG_channel_select_from((m_channel_t) pd->chan, timeout, &r_pid));
   
   if (r_pid < 0) {
     DEBUG0("TIMEOUT");
   
   if (r_pid < 0) {
     DEBUG0("TIMEOUT");
@@ -74,7 +74,7 @@ gras_trp_select(double timeout,
   /* Socket to expeditor not created yet */
   DEBUG0("Create a socket to the expeditor");
   
   /* Socket to expeditor not created yet */
   DEBUG0("Create a socket to the expeditor");
   
-  TRY(gras_trp_plugin_get_by_name("buf",&trp));
+  TRYOLD(gras_trp_plugin_get_by_name("buf",&trp));
   
   gras_trp_socket_new(1,dst);
   (*dst)->plugin   = trp;
   
   gras_trp_socket_new(1,dst);
   (*dst)->plugin   = trp;
index 13b92aa..ae0fb62 100644 (file)
@@ -199,7 +199,7 @@ gras_socket_server_ext(unsigned short port,
   DEBUG2("Create a server socket from plugin %s on port %d",
         gras_if_RL() ? "tcp" : "sg",
         port);
   DEBUG2("Create a server socket from plugin %s on port %d",
         gras_if_RL() ? "tcp" : "sg",
         port);
-  TRY(gras_trp_plugin_get_by_name((measurement? (gras_if_RL() ? "tcp" : "sg")
+  TRYOLD(gras_trp_plugin_get_by_name((measurement? (gras_if_RL() ? "tcp" : "sg")
                                              :"buf"),
                                  &trp));
 
                                              :"buf"),
                                  &trp));
 
@@ -249,7 +249,7 @@ gras_socket_client_ext(const char *host,
 
   *dst = NULL;
 
 
   *dst = NULL;
 
-  TRY(gras_trp_plugin_get_by_name((measurement? (gras_if_RL() ? "tcp" : "sg")
+  TRYOLD(gras_trp_plugin_get_by_name((measurement? (gras_if_RL() ? "tcp" : "sg")
                                              :"buf"),
                                  &trp));
 
                                              :"buf"),
                                  &trp));
 
@@ -428,7 +428,7 @@ xbt_error_t gras_socket_meas_send(gras_socket_t peer,
      CDEBUG5(trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d",
             exp_sofar,exp_size,msg_size,
             gras_socket_peer_name(peer), gras_socket_peer_port(peer));
      CDEBUG5(trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d",
             exp_sofar,exp_size,msg_size,
             gras_socket_peer_name(peer), gras_socket_peer_port(peer));
-     TRY(gras_trp_chunk_send(peer,chunk,msg_size));
+     TRYOLD(gras_trp_chunk_send(peer,chunk,msg_size));
   }
   CDEBUG5(trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d",
          exp_sofar,exp_size,msg_size,
   }
   CDEBUG5(trp_meas,"Sent %lu of %lu (msg_size=%ld) to %s:%d",
          exp_sofar,exp_size,msg_size,
@@ -462,7 +462,7 @@ xbt_error_t gras_socket_meas_recv(gras_socket_t peer,
      CDEBUG5(trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d",
             exp_sofar,exp_size,msg_size,
             gras_socket_peer_name(peer), gras_socket_peer_port(peer));
      CDEBUG5(trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d",
             exp_sofar,exp_size,msg_size,
             gras_socket_peer_name(peer), gras_socket_peer_port(peer));
-     TRY(gras_trp_chunk_recv(peer,chunk,msg_size));
+     TRYOLD(gras_trp_chunk_recv(peer,chunk,msg_size));
   }
   CDEBUG5(trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d",
          exp_sofar,exp_size,msg_size,
   }
   CDEBUG5(trp_meas,"Recvd %ld of %lu (msg_size=%ld) from %s:%d",
          exp_sofar,exp_size,msg_size,
@@ -499,7 +499,7 @@ xbt_error_t gras_socket_meas_accept(gras_socket_t peer, gras_socket_t *accepted)
     return no_error;
   }
 
     return no_error;
   }
 
-  TRY((peer->plugin->socket_accept)(peer,accepted));
+  TRYOLD((peer->plugin->socket_accept)(peer,accepted));
   (*accepted)->meas = peer->meas;
   CDEBUG1(trp_meas,"meas_accepted onto %d",(*accepted)->sd);
 
   (*accepted)->meas = peer->meas;
   CDEBUG1(trp_meas,"meas_accepted onto %d",(*accepted)->sd);
 
index dde6dc8..433fb63 100644 (file)
@@ -98,7 +98,7 @@ gras_trp_buf_setup(gras_trp_plugin_t plug) {
   gras_trp_buf_plug_data_t *data =xbt_new(gras_trp_buf_plug_data_t,1);
 
   XBT_IN;
   gras_trp_buf_plug_data_t *data =xbt_new(gras_trp_buf_plug_data_t,1);
 
   XBT_IN;
-  TRY(gras_trp_plugin_get_by_name(gras_if_RL() ? "tcp" : "sg",
+  TRYOLD(gras_trp_plugin_get_by_name(gras_if_RL() ? "tcp" : "sg",
                                  &_buf_super));
   DEBUG1("Derivate a buffer plugin from %s",gras_if_RL() ? "tcp" : "sg");
 
                                  &_buf_super));
   DEBUG1("Derivate a buffer plugin from %s",gras_if_RL() ? "tcp" : "sg");
 
@@ -123,7 +123,7 @@ xbt_error_t gras_trp_buf_socket_client(gras_trp_plugin_t self,
   xbt_error_t errcode;
 
   XBT_IN;
   xbt_error_t errcode;
 
   XBT_IN;
-  TRY(_buf_super->socket_client(_buf_super,sock));
+  TRYOLD(_buf_super->socket_client(_buf_super,sock));
   sock->plugin = self;
   gras_trp_buf_init_sock(sock);
     
   sock->plugin = self;
   gras_trp_buf_init_sock(sock);
     
@@ -140,7 +140,7 @@ xbt_error_t gras_trp_buf_socket_server(gras_trp_plugin_t self,
   xbt_error_t errcode;
 
   XBT_IN;
   xbt_error_t errcode;
 
   XBT_IN;
-  TRY(_buf_super->socket_server(_buf_super,sock));
+  TRYOLD(_buf_super->socket_server(_buf_super,sock));
   sock->plugin = self;
   gras_trp_buf_init_sock(sock);
   return no_error;
   sock->plugin = self;
   gras_trp_buf_init_sock(sock);
   return no_error;
@@ -152,7 +152,7 @@ gras_trp_buf_socket_accept(gras_socket_t  sock,
   xbt_error_t errcode;
       
   XBT_IN;
   xbt_error_t errcode;
       
   XBT_IN;
-  TRY(_buf_super->socket_accept(sock,dst));
+  TRYOLD(_buf_super->socket_accept(sock,dst));
   (*dst)->plugin = sock->plugin;
   gras_trp_buf_init_sock(*dst);
   XBT_OUT;
   (*dst)->plugin = sock->plugin;
   gras_trp_buf_init_sock(*dst);
   XBT_OUT;
@@ -217,7 +217,7 @@ gras_trp_buf_chunk_send(gras_socket_t sock,
           data->out.size,size-chunk_pos,size,(int)chunk_pos,chunk);
 
     if (data->out.size == data->buffsize) /* out of space. Flush it */
           data->out.size,size-chunk_pos,size,(int)chunk_pos,chunk);
 
     if (data->out.size == data->buffsize) /* out of space. Flush it */
-      TRY(gras_trp_buf_flush(sock));
+      TRYOLD(gras_trp_buf_flush(sock));
   }
 
   XBT_OUT;
   }
 
   XBT_OUT;
@@ -262,7 +262,7 @@ gras_trp_buf_chunk_recv(gras_socket_t sock,
         data->in.size = -1;
       }
        
         data->in.size = -1;
       }
        
-      TRY(_buf_super->chunk_recv(sock, data->in.data, data->in.size));
+      TRYOLD(_buf_super->chunk_recv(sock, data->in.data, data->in.size));
        
       if (gras_if_RL()) {
         data->in.pos=0;
        
       if (gras_if_RL()) {
         data->in.pos=0;
@@ -319,7 +319,7 @@ gras_trp_buf_flush(gras_socket_t sock) {
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
   if (gras_if_RL()) {
      size = (int)htonl(size);
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
   if (gras_if_RL()) {
      size = (int)htonl(size);
-     TRY(_buf_super->chunk_send(sock,(char*) &size, 4));
+     TRYOLD(_buf_super->chunk_send(sock,(char*) &size, 4));
   } else {
      memcpy(data->out.data, &size, 4);
   }
   } else {
      memcpy(data->out.data, &size, 4);
   }
@@ -327,7 +327,7 @@ gras_trp_buf_flush(gras_socket_t sock) {
 
   DEBUG3("Send the chunk (size=%d) to %s:%d",data->out.size,
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
 
   DEBUG3("Send the chunk (size=%d) to %s:%d",data->out.size,
         gras_socket_peer_name(sock),gras_socket_peer_port(sock));
-  TRY(_buf_super->chunk_send(sock, data->out.data, data->out.size));
+  TRYOLD(_buf_super->chunk_send(sock, data->out.data, data->out.size));
   VERB1("Chunk sent (size=%d)",data->out.size);
   if (XBT_LOG_ISENABLED(trp_buf,xbt_log_priority_debug))
      hexa_print("chunck sent    ",data->out.data,data->out.size);
   VERB1("Chunk sent (size=%d)",data->out.size);
   if (XBT_LOG_ISENABLED(trp_buf,xbt_log_priority_debug))
      hexa_print("chunck sent    ",data->out.data,data->out.size);
index f99f759..86bd04d 100644 (file)
@@ -81,7 +81,7 @@ gras_socket_client_from_file(const char*path,
 
   gras_trp_socket_new(0,dst);
 
 
   gras_trp_socket_new(0,dst);
 
-  TRY(gras_trp_plugin_get_by_name("file",&trp));
+  TRYOLD(gras_trp_plugin_get_by_name("file",&trp));
   (*dst)->plugin=trp;
 
   if (strcmp("-", path)) {
   (*dst)->plugin=trp;
 
   if (strcmp("-", path)) {
@@ -124,7 +124,7 @@ gras_socket_server_from_file(const char*path,
 
   gras_trp_socket_new(1,dst);
 
 
   gras_trp_socket_new(1,dst);
 
-  TRY(gras_trp_plugin_get_by_name("file",&trp));
+  TRYOLD(gras_trp_plugin_get_by_name("file",&trp));
   (*dst)->plugin=trp;
 
 
   (*dst)->plugin=trp;
 
 
index aade802..fc595b2 100644 (file)
@@ -460,22 +460,22 @@ xbt_cfg_set_vargs(xbt_cfg_t cfg, const char *name, va_list pa) {
   case xbt_cfgelm_host:
     str = va_arg(pa, char *);
     i=va_arg(pa,int);
   case xbt_cfgelm_host:
     str = va_arg(pa, char *);
     i=va_arg(pa,int);
-    TRY(xbt_cfg_set_host(cfg,name,str,i));
+    TRYOLD(xbt_cfg_set_host(cfg,name,str,i));
     break;
       
   case xbt_cfgelm_string:
     str=va_arg(pa, char *);
     break;
       
   case xbt_cfgelm_string:
     str=va_arg(pa, char *);
-    TRY(xbt_cfg_set_string(cfg, name, str));
+    TRYOLD(xbt_cfg_set_string(cfg, name, str));
     break;
 
   case xbt_cfgelm_int:
     i=va_arg(pa,int);
     break;
 
   case xbt_cfgelm_int:
     i=va_arg(pa,int);
-    TRY(xbt_cfg_set_int(cfg,name,i));
+    TRYOLD(xbt_cfg_set_int(cfg,name,i));
     break;
 
   case xbt_cfgelm_double:
     d=va_arg(pa,double);
     break;
 
   case xbt_cfgelm_double:
     d=va_arg(pa,double);
-    TRY(xbt_cfg_set_double(cfg,name,d));
+    TRYOLD(xbt_cfg_set_double(cfg,name,d));
     break;
 
   default:
     break;
 
   default:
@@ -688,7 +688,7 @@ xbt_cfg_set_int(xbt_cfg_t cfg,const char*name, int val) {
   xbt_error_t errcode;
 
   VERB2("Configuration setting: %s=%d",name,val);
   xbt_error_t errcode;
 
   VERB2("Configuration setting: %s=%d",name,val);
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
@@ -722,7 +722,7 @@ xbt_cfg_set_double(xbt_cfg_t cfg,const char*name, double val) {
   xbt_error_t errcode;
 
   VERB2("Configuration setting: %s=%f",name,val);
   xbt_error_t errcode;
 
   VERB2("Configuration setting: %s=%f",name,val);
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
@@ -758,7 +758,7 @@ xbt_cfg_set_string(xbt_cfg_t cfg,const char*name, const char*val) {
   char *newval = xbt_strdup(val);
 
   VERB2("Configuration setting: %s=%s",name,val);
   char *newval = xbt_strdup(val);
 
   VERB2("Configuration setting: %s=%s",name,val);
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
@@ -801,7 +801,7 @@ xbt_cfg_set_host(xbt_cfg_t cfg,const char*name,
   val->name = xbt_strdup(name);
   val->port = port;
 
   val->name = xbt_strdup(name);
   val->port = port;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
 
   if (variable->max == 1) {
     if (variable->cb_rm && xbt_dynar_length(variable->content))
@@ -841,7 +841,7 @@ xbt_error_t xbt_cfg_rm_int(xbt_cfg_t cfg,const char*name, int val) {
            "Cannot remove value %d from the config element %s since it's already at its minimal size (=%d)",
            val,name,variable->min); 
 
            "Cannot remove value %d from the config element %s since it's already at its minimal size (=%d)",
            val,name,variable->min); 
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (seen == val) {
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (seen == val) {
@@ -874,7 +874,7 @@ xbt_error_t xbt_cfg_rm_double(xbt_cfg_t cfg,const char*name, double val) {
            "Cannot remove value %f from the config element %s since it's already at its minimal size (=%d)",
            val,name,variable->min); 
 
            "Cannot remove value %f from the config element %s since it's already at its minimal size (=%d)",
            val,name,variable->min); 
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (seen == val) {
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (seen == val) {
@@ -907,7 +907,7 @@ xbt_cfg_rm_string(xbt_cfg_t cfg,const char*name, const char *val) {
            "Cannot remove value %s from the config element %s since it's already at its minimal size (=%d)",
            name,val,variable->min); 
            
            "Cannot remove value %s from the config element %s since it's already at its minimal size (=%d)",
            name,val,variable->min); 
            
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (!strcpy(seen,val)) {
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (!strcpy(seen,val)) {
@@ -942,7 +942,7 @@ xbt_cfg_rm_host(xbt_cfg_t cfg,const char*name, const char *host,int port) {
            "Cannot remove value %s:%d from the config element %s since it's already at its minimal size (=%d)",
            host,port,name,variable->min); 
            
            "Cannot remove value %s:%d from the config element %s since it's already at its minimal size (=%d)",
            host,port,name,variable->min); 
            
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (!strcpy(seen->name,host) && seen->port == port) {
   
   xbt_dynar_foreach(variable->content,cpt,seen) {
     if (!strcpy(seen->name,host) && seen->port == port) {
@@ -971,7 +971,7 @@ xbt_error_t xbt_cfg_rm_at   (xbt_cfg_t cfg, const char *name, int pos) {
            "Cannot remove %dth value from the config element %s since it's already at its minimal size (=%d)",
            pos,name,variable->min); 
            
            "Cannot remove %dth value from the config element %s since it's already at its minimal size (=%d)",
            pos,name,variable->min); 
            
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_any,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_any,&variable));
   
   if (variable->cb_rm) (*variable->cb_rm)(name, pos);    
   xbt_dynar_remove_at(variable->content, pos, NULL);
   
   if (variable->cb_rm) (*variable->cb_rm)(name, pos);    
   xbt_dynar_remove_at(variable->content, pos, NULL);
@@ -1033,7 +1033,7 @@ xbt_cfg_get_int   (xbt_cfg_t  cfg,
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values",
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values",
@@ -1064,7 +1064,7 @@ xbt_cfg_get_double(xbt_cfg_t  cfg,
   xbt_cfgelm_t variable;
   xbt_error_t  errcode;
 
   xbt_cfgelm_t variable;
   xbt_error_t  errcode;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
@@ -1096,7 +1096,7 @@ xbt_error_t xbt_cfg_get_string(xbt_cfg_t  cfg,
 
   *val=NULL;
 
 
   *val=NULL;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
@@ -1129,7 +1129,7 @@ xbt_error_t xbt_cfg_get_host  (xbt_cfg_t  cfg,
   xbt_error_t  errcode;
   xbt_host_t  *val;
 
   xbt_error_t  errcode;
   xbt_host_t  *val;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_host,&variable));
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
 
   if (xbt_dynar_length(variable->content) > 1) {
     WARN2("You asked for the first value of the config element '%s', but there is %lu values\n",
@@ -1183,7 +1183,7 @@ xbt_cfg_get_int_at(xbt_cfg_t   cfg,
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
   *val = xbt_dynar_get_as(variable->content, pos, int);
   return no_error; 
 }
   *val = xbt_dynar_get_as(variable->content, pos, int);
   return no_error; 
 }
@@ -1198,7 +1198,7 @@ xbt_cfg_get_double_at(xbt_cfg_t   cfg,
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_double,&variable));
   *val = xbt_dynar_get_as(variable->content, pos, double);
   return no_error; 
 }
   *val = xbt_dynar_get_as(variable->content, pos, double);
   return no_error; 
 }
@@ -1214,7 +1214,7 @@ xbt_cfg_get_string_at(xbt_cfg_t   cfg,
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
   xbt_cfgelm_t variable;
   xbt_error_t errcode;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_string,&variable));
   *val = xbt_dynar_get_as(variable->content, pos, char*);
   return no_error; 
 }
   *val = xbt_dynar_get_as(variable->content, pos, char*);
   return no_error; 
 }
@@ -1231,7 +1231,7 @@ xbt_cfg_get_host_at(xbt_cfg_t   cfg,
   xbt_error_t errcode;
   xbt_host_t *val;
 
   xbt_error_t errcode;
   xbt_host_t *val;
 
-  TRY (xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
+  TRYOLD(xbt_cfgelm_get(cfg,name,xbt_cfgelm_int,&variable));
   val = xbt_dynar_get_ptr(variable->content, pos);
   *port = val->port;
   *host = val->name;
   val = xbt_dynar_get_ptr(variable->content, pos);
   *port = val->port;
   *host = val->name;
index 1e33935..71780eb 100644 (file)
@@ -208,7 +208,7 @@ xbt_dict_cursor_get_key(xbt_dict_cursor_t   cursor,
                          /*OUT*/char        **key) {
   xbt_error_t errcode = no_error;
 
                          /*OUT*/char        **key) {
   xbt_error_t errcode = no_error;
 
-  TRY(__cursor_not_null(cursor));
+  TRYOLD(__cursor_not_null(cursor));
 
   *key = xbt_dynar_get_as(cursor->keys, cursor->pos - 1, char*);
 
 
   *key = xbt_dynar_get_as(cursor->keys, cursor->pos - 1, char*);
 
@@ -227,12 +227,12 @@ xbt_dict_cursor_get_data(xbt_dict_cursor_t   cursor,
   char         *key     = NULL;
   int           key_len = 0;
 
   char         *key     = NULL;
   int           key_len = 0;
 
-  TRY(__cursor_not_null(cursor));
+  TRYOLD(__cursor_not_null(cursor));
 
   key     = xbt_dynar_get_as(cursor->keys,     cursor->pos-1,  char *);
   key_len = xbt_dynar_get_as(cursor->key_lens, cursor->pos_len-1, int);
 
 
   key     = xbt_dynar_get_as(cursor->keys,     cursor->pos-1,  char *);
   key_len = xbt_dynar_get_as(cursor->key_lens, cursor->pos_len-1, int);
 
-  TRY(xbt_dictelm_get_ext(cursor->head, key, key_len, data));
+  TRYOLD(xbt_dictelm_get_ext(cursor->head, key, key_len, data));
 
   return errcode;
 }
 
   return errcode;
 }
index f78f7aa..714f0bc 100644 (file)
@@ -861,7 +861,7 @@ _xbt_dictelm_remove_rec(xbt_dictelm_t head,
         p_child = xbt_dynar_get_as(head->sub, pos, s_xbt_dictelm_t*);
         /*DEBUG5("Recurse on child %d of %p to remove %.*s (prefix=%d)",
           pos, (void*)p_child, key+offset, key_len-offset,offset);*/
         p_child = xbt_dynar_get_as(head->sub, pos, s_xbt_dictelm_t*);
         /*DEBUG5("Recurse on child %d of %p to remove %.*s (prefix=%d)",
           pos, (void*)p_child, key+offset, key_len-offset,offset);*/
-        TRY(_xbt_dictelm_remove_rec(p_child, key, key_len, offset));
+        TRYOLD(_xbt_dictelm_remove_rec(p_child, key, key_len, offset));
 
         _collapse_if_need(head, pos, old_offset);
        return no_error;
 
         _collapse_if_need(head, pos, old_offset);
        return no_error;
index 4fa432e..606e4b7 100644 (file)
@@ -138,7 +138,7 @@ xbt_multidict_get_ext(xbt_dict_t  mdict,
       i, thislevel, thislen, thiskey, (int)thislen,thiskey);
 
     /* search the dict of next level: let mismatch raise if not found */
       i, thislevel, thislen, thiskey, (int)thislen,thiskey);
 
     /* search the dict of next level: let mismatch raise if not found */
-    TRY(xbt_dict_get_ext(thislevel, thiskey, thislen, (void*)&nextlevel));
+    TRYOLD(xbt_dict_get_ext(thislevel, thiskey, thislen, (void*)&nextlevel));
   }
   
   xbt_dynar_get_cpy(keys, i, &thiskey);
   }
   
   xbt_dynar_get_cpy(keys, i, &thiskey);
index 88dc74d..1477880 100644 (file)
@@ -31,19 +31,19 @@ write_read(gras_datadesc_type_t type,void *src, void *dst,
    
   /* write */
   if (direction == RW) 
    
   /* write */
   if (direction == RW) 
-    TRY(gras_socket_client_from_file(filename,&sock));
+    TRYOLD(gras_socket_client_from_file(filename,&sock));
   if (direction == WRITE || direction == RW)
   if (direction == WRITE || direction == RW)
-    TRY(gras_datadesc_send(sock, type, src));
-/*  TRY(gras_datadesc_gen_send(sock, type, src));*/
+    TRYOLD(gras_datadesc_send(sock, type, src));
+/*  TRYOLD(gras_datadesc_gen_send(sock, type, src));*/
   if (direction == RW) 
     gras_socket_close(sock);
    
   /* read */
   if (direction == RW) 
   if (direction == RW) 
     gras_socket_close(sock);
    
   /* read */
   if (direction == RW) 
-    TRY(gras_socket_server_from_file(filename,&sock));
+    TRYOLD(gras_socket_server_from_file(filename,&sock));
 
   if (direction == READ || direction == RW)
 
   if (direction == READ || direction == RW)
-    TRY(gras_datadesc_recv(sock, type, r_arch, dst));
+    TRYOLD(gras_datadesc_recv(sock, type, r_arch, dst));
 
   if (direction == RW) 
     gras_socket_close(sock);
 
   if (direction == RW) 
     gras_socket_close(sock);
@@ -79,7 +79,7 @@ xbt_error_t test_int(gras_socket_t sock, int direction) {
   int i=5,j;
   
   INFO0("---- Test on integer ----");
   int i=5,j;
   
   INFO0("---- Test on integer ----");
-  TRY(write_read(gras_datadesc_by_name("int"), &i,&j, sock,direction));
+  TRYOLD(write_read(gras_datadesc_by_name("int"), &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert(i == j);
   }
   if (direction == READ || direction == RW) {
     xbt_assert(i == j);
   }
@@ -90,7 +90,7 @@ xbt_error_t test_float(gras_socket_t sock, int direction) {
   float i=5.0,j;
   
   INFO0("---- Test on float ----");
   float i=5.0,j;
   
   INFO0("---- Test on float ----");
-  TRY(write_read(gras_datadesc_by_name("float"), &i,&j, sock,direction));
+  TRYOLD(write_read(gras_datadesc_by_name("float"), &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert2(i == j,"%f != %f",i,j);
   }
   if (direction == READ || direction == RW) {
     xbt_assert2(i == j,"%f != %f",i,j);
   }
@@ -101,7 +101,7 @@ xbt_error_t test_double(gras_socket_t sock, int direction) {
   double i=-3252355.1234,j;
   
   INFO0("---- Test on double ----");
   double i=-3252355.1234,j;
   
   INFO0("---- Test on double ----");
-  TRY(write_read(gras_datadesc_by_name("double"), &i,&j, sock,direction));
+  TRYOLD(write_read(gras_datadesc_by_name("double"), &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert2(i == j,"%f != %f",i,j);
   }
   if (direction == READ || direction == RW) {
     xbt_assert2(i == j,"%f != %f",i,j);
   }
@@ -124,7 +124,7 @@ xbt_error_t test_array(gras_socket_t sock, int direction) {
                                    gras_datadesc_by_name("int"),
                                    SIZE);
 
                                    gras_datadesc_by_name("int"),
                                    SIZE);
 
-  TRY(write_read(my_type, &i,&j, sock,direction));
+  TRYOLD(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     for (cpt=0; cpt<SIZE; cpt++) {
       DEBUG1("Test spot %d",cpt);
   if (direction == READ || direction == RW) {
     for (cpt=0; cpt<SIZE; cpt++) {
       DEBUG1("Test spot %d",cpt);
@@ -150,7 +150,7 @@ xbt_error_t test_dynar_scal(gras_socket_t sock, int direction){
     DEBUG2("Push %d, length=%lu",cpt, xbt_dynar_length(i));
   }
 /*  xbt_dynar_dump(i);*/
     DEBUG2("Push %d, length=%lu",cpt, xbt_dynar_length(i));
   }
 /*  xbt_dynar_dump(i);*/
-  TRY(write_read(my_type, &i,&j, sock, direction));
+  TRYOLD(write_read(my_type, &i,&j, sock, direction));
 /*  xbt_dynar_dump(j);*/
   if (direction == READ || direction == RW) {
      for (cpt=0; cpt<64; cpt++){
 /*  xbt_dynar_dump(j);*/
   if (direction == READ || direction == RW) {
      for (cpt=0; cpt<64; cpt++){
@@ -179,7 +179,7 @@ xbt_error_t test_intref(gras_socket_t sock, int direction) {
 
   my_type = gras_datadesc_ref("int*",gras_datadesc_by_name("int"));
 
 
   my_type = gras_datadesc_ref("int*",gras_datadesc_by_name("int"));
 
-  TRY(write_read(my_type, &i,&j, sock,direction));
+  TRYOLD(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert(*i == *j);
     free(j);
   if (direction == READ || direction == RW) {
     xbt_assert(*i == *j);
     free(j);
@@ -197,7 +197,7 @@ xbt_error_t test_string(gras_socket_t sock, int direction) {
   int cpt;
   
   INFO0("---- Test on string (ref to dynamic array) ----");
   int cpt;
   
   INFO0("---- Test on string (ref to dynamic array) ----");
-  TRY(write_read(gras_datadesc_by_name("string"), &i,&j,
+  TRYOLD(write_read(gras_datadesc_by_name("string"), &i,&j,
                 sock,direction));
   if (direction == READ || direction == RW) {
     for (cpt=0; cpt<strlen(i); cpt++) {
                 sock,direction));
   if (direction == READ || direction == RW) {
     for (cpt=0; cpt<strlen(i); cpt++) {
@@ -242,7 +242,7 @@ xbt_error_t test_homostruct(gras_socket_t sock, int direction) {
   i->a = 2235;    i->b = 433425;
   i->c = -23423;  i->d = -235235;
 
   i->a = 2235;    i->b = 433425;
   i->c = -23423;  i->d = -235235;
 
-  TRY(write_read(my_type, &i,&j, sock,direction));
+  TRYOLD(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert2(i->a == j->a,"i->a=%d != j->a=%d",i->a,j->a);
     xbt_assert(i->b == j->b);
   if (direction == READ || direction == RW) {
     xbt_assert2(i->a == j->a,"i->a=%d != j->a=%d",i->a,j->a);
     xbt_assert(i->b == j->b);
@@ -288,7 +288,7 @@ xbt_error_t test_hetestruct(gras_socket_t sock, int direction) {
   i->c1 = 's'; i->l1 = 123455;
   i->c2 = 'e'; i->l2 = 774531;
 
   i->c1 = 's'; i->l1 = 123455;
   i->c2 = 'e'; i->l2 = 774531;
 
-  TRY(write_read(my_type, &i,&j, sock,direction));
+  TRYOLD(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert(i->c1 == j->c1);
     xbt_assert(i->c2 == j->c2);
   if (direction == READ || direction == RW) {
     xbt_assert(i->c1 == j->c1);
     xbt_assert(i->c2 == j->c2);
@@ -330,7 +330,7 @@ xbt_error_t test_nestedstruct(gras_socket_t sock, int direction) {
   i->hete.c1 = 's'; i->hete.l1 = 123455;
   i->hete.c2 = 'e'; i->hete.l2 = 774531;
 
   i->hete.c1 = 's'; i->hete.l1 = 123455;
   i->hete.c2 = 'e'; i->hete.l2 = 774531;
 
-  TRY(write_read(my_type, &i,&j, sock,direction));
+  TRYOLD(write_read(my_type, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert(i->homo.a == j->homo.a);
     xbt_assert(i->homo.b == j->homo.b);
   if (direction == READ || direction == RW) {
     xbt_assert(i->homo.a == j->homo.a);
     xbt_assert(i->homo.b == j->homo.b);
@@ -403,7 +403,7 @@ xbt_error_t test_chain_list(gras_socket_t sock, int direction) {
   i = cons( 12355, cons( 246264 , cons( 23263, NULL)));
   j = NULL;
 
   i = cons( 12355, cons( 246264 , cons( 23263, NULL)));
   j = NULL;
 
-  TRY(write_read(gras_datadesc_by_name("chained_list_t*"),
+  TRYOLD(write_read(gras_datadesc_by_name("chained_list_t*"),
                 &i,&j,
                 sock,direction));
   if (direction == READ || direction == RW) {
                 &i,&j,
                 sock,direction));
   if (direction == READ || direction == RW) {
@@ -428,7 +428,7 @@ xbt_error_t test_graph(gras_socket_t sock, int direction) {
   j = NULL;
 
   gras_datadesc_cycle_set(gras_datadesc_by_name("chained_list_t*"));
   j = NULL;
 
   gras_datadesc_cycle_set(gras_datadesc_by_name("chained_list_t*"));
-  TRY(write_read(gras_datadesc_by_name("chained_list_t*"),
+  TRYOLD(write_read(gras_datadesc_by_name("chained_list_t*"),
                 &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     
                 &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     
@@ -479,7 +479,7 @@ xbt_error_t test_dynar_ref(gras_socket_t sock, int direction){
     xbt_dynar_push(i,&s1);
   }
 
     xbt_dynar_push(i,&s1);
   }
 
-  TRY(write_read(my_type, &i,&j, sock, direction));
+  TRYOLD(write_read(my_type, &i,&j, sock, direction));
   if (direction == READ || direction == RW) {
      for (cpt=0; cpt< 64; cpt++) {
        sprintf(buf,"%d",cpt);
   if (direction == READ || direction == RW) {
      for (cpt=0; cpt< 64; cpt++) {
        sprintf(buf,"%d",cpt);
@@ -555,7 +555,7 @@ xbt_error_t test_pbio(gras_socket_t sock, int direction) {
     for (cpt2=0; cpt2<106; cpt2++) 
       i.Cddsdde[cpt][cpt2] = ((double)cpt) * ((double)cpt2);
   }
     for (cpt2=0; cpt2<106; cpt2++) 
       i.Cddsdde[cpt][cpt2] = ((double)cpt) * ((double)cpt2);
   }
-  TRY(write_read(gras_datadesc_by_symbol(s_pbio),
+  TRYOLD(write_read(gras_datadesc_by_symbol(s_pbio),
                 &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     /* Check that the data match */
                 &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     /* Check that the data match */
@@ -624,7 +624,7 @@ xbt_error_t test_clause(gras_socket_t sock, int direction) {
 
   ddt=gras_datadesc_ref("Clause*",ddt);
 
 
   ddt=gras_datadesc_ref("Clause*",ddt);
 
-  TRY(write_read(ddt, &i,&j, sock,direction));
+  TRYOLD(write_read(ddt, &i,&j, sock,direction));
   if (direction == READ || direction == RW) {
     xbt_assert(i->num_lits == j->num_lits);
     for (cpt=0; cpt<i->num_lits; cpt++)
   if (direction == READ || direction == RW) {
     xbt_assert(i->num_lits == j->num_lits);
     for (cpt=0; cpt<i->num_lits; cpt++)
@@ -659,12 +659,12 @@ int main(int argc,char *argv[]) {
     
   if (direction == WRITE) {
     TRYFAIL(gras_socket_client_from_file(filename,&sock));
     
   if (direction == WRITE) {
     TRYFAIL(gras_socket_client_from_file(filename,&sock));
-    TRY(gras_datadesc_send(sock, gras_datadesc_by_name("char"),
+    TRYOLD(gras_datadesc_send(sock, gras_datadesc_by_name("char"),
                           &r_arch_char));
   }
   if (direction == READ) {
     TRYFAIL(gras_socket_server_from_file(filename,&sock));
                           &r_arch_char));
   }
   if (direction == READ) {
     TRYFAIL(gras_socket_server_from_file(filename,&sock));
-    TRY(gras_datadesc_recv(sock, gras_datadesc_by_name("char"),
+    TRYOLD(gras_datadesc_recv(sock, gras_datadesc_by_name("char"),
                           gras_arch_selfid(), &r_arch_char));
     INFO3("This datafile was generated on %s (%d), I'm %s.",
          gras_datadesc_arch_name(r_arch_char),(int)r_arch_char,
                           gras_arch_selfid(), &r_arch_char));
     INFO3("This datafile was generated on %s (%d), I'm %s.",
          gras_datadesc_arch_name(r_arch_char),(int)r_arch_char,
index 5f0ef99..fb842f4 100755 (executable)
@@ -63,7 +63,7 @@ for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l
 print "  INFO0(\"---- Test on all possible struct having 3 fields (".(($max_i+1)*($max_j+1)*($max_k+1)*($max_l+1))." structs) ----\");\n";
 for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l) {
     my $struct=$abrev[$i].$abrev[$j].$abrev[$k].$abrev[$l];
 print "  INFO0(\"---- Test on all possible struct having 3 fields (".(($max_i+1)*($max_j+1)*($max_k+1)*($max_l+1))." structs) ----\");\n";
 for $i (0..$max_i) { for $j (0..$max_j) { for $k (0..$max_k) { for $l (0..$max_l) {
     my $struct=$abrev[$i].$abrev[$j].$abrev[$k].$abrev[$l];
-    print "  TRY(write_read(gras_datadesc_by_symbol($struct), &my_$struct, &my_${struct}2, sock,direction));\n";
+    print "  TRYOLD(write_read(gras_datadesc_by_symbol($struct), &my_$struct, &my_${struct}2, sock,direction));\n";
     print "  if (direction == READ || direction == RW) {\n";
     print "     int failed = 0;\n";
     print "     test(my_$struct.a == my_${struct}2.a);\n";
     print "  if (direction == READ || direction == RW) {\n";
     print "     int failed = 0;\n";
     print "     test(my_$struct.a == my_${struct}2.a);\n";