Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Gcc is *very* permissive with pointers to functions. If we declare them as function...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Oct 2007 13:07:35 +0000 (13:07 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 4 Oct 2007 13:07:35 +0000 (13:07 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4783 48e7efb5-ca39-0410-a469-dd3cf9ba447f

41 files changed:
include/gras/datadesc.h
include/gras/module.h
include/surf/surfxml_parse.h
include/xbt/dict.h
include/xbt/dynar.h
include/xbt/function_types.h
include/xbt/graph.h
include/xbt/graphxml_parse.h
include/xbt/heap.h
include/xbt/matrix.h
include/xbt/set.h
include/xbt/synchro.h
include/xbt/virtu.h
src/gras/DataDesc/ddt_create.c
src/gras/DataDesc/ddt_parse.c
src/gras/Msg/msg_private.h
src/gras/Msg/timer.c
src/gras/Virtu/gras_module.c
src/gras/Virtu/process.c
src/include/simix/simix.h
src/simix/private.h
src/simix/smx_deployment.c
src/simix/smx_global.c
src/surf/surfxml_parse.c
src/xbt/context_private.h
src/xbt/dict.c
src/xbt/dict_multi.c
src/xbt/dict_private.h
src/xbt/dynar.c
src/xbt/dynar_private.h
src/xbt/graph.c
src/xbt/graphxml_parse.c
src/xbt/heap.c
src/xbt/heap_private.h
src/xbt/mallocator_private.h
src/xbt/set.c
src/xbt/xbt_matrix.c
src/xbt/xbt_os_thread.c
src/xbt/xbt_rl_synchro.c
src/xbt/xbt_sg_synchro.c
src/xbt/xbt_virtu.c

index a3c27d2..f19da0a 100644 (file)
@@ -368,10 +368,10 @@ XBT_PUBLIC(gras_datadesc_type_t)
 
 XBT_PUBLIC(gras_datadesc_type_t) 
   gras_datadesc_dynar(gras_datadesc_type_t elm_t,
-                     void_f_pvoid_t *free_func);
+                     void_f_pvoid_t free_func);
 XBT_PUBLIC(gras_datadesc_type_t)
   gras_datadesc_matrix(gras_datadesc_type_t elm_t,
-                      void_f_pvoid_t const free_f);
+                      void_f_pvoid_t const free_f);
 
 /*********************************
  * Change stuff within datadescs *
index 63f8195..3e45c9b 100644 (file)
@@ -11,8 +11,8 @@ XBT_PUBLIC(void) gras_module_leave(const char *name);
 
 /* Functions module implementor should use */
 XBT_PUBLIC(void) gras_module_add(const char *name, unsigned int data_size, int *ID,
-                    void_f_void_t  *init_f, void_f_void_t  *exit_f,
-                    void_f_pvoid_t *join_f, void_f_pvoid_t *leave_f) ;
+                    void_f_void_t  init_f, void_f_void_t  exit_f,
+                    void_f_pvoid_t join_f, void_f_pvoid_t leave_f) ;
 
 
 XBT_PUBLIC(void*)gras_moddata_by_id(unsigned int ID);
index 8d19128..a219d2f 100644 (file)
 #include "surf/surfxml.h"
 #include "xbt/function_types.h"
 /* Entry-point of the surfxml parser. */
-XBT_PUBLIC_DATA(int_f_void_t *) surf_parse;
+XBT_PUBLIC_DATA(int_f_void_t) surf_parse;
 
 /* Hook for the different tags. They can be redefined at will whereas
    the versions without the _fun can't. */
 
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_platform_description_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_platform_description_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_cpu_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_cpu_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_router_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_router_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_network_link_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_network_link_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_route_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_route_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_route_element_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_route_element_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_process_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_process_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) STag_surfxml_argument_fun;
-XBT_PUBLIC_DATA(void_f_void_t *) ETag_surfxml_argument_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_platform_description_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_platform_description_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_cpu_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_cpu_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_router_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_router_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_network_link_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_network_link_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_route_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_route_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_route_element_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_route_element_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_process_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_process_fun;
+XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_argument_fun;
+XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_argument_fun;
 
 XBT_PUBLIC(void) surf_parse_open(const char *file);
 XBT_PUBLIC(void) surf_parse_close(void);
index dd4de16..c7d4430 100644 (file)
@@ -58,7 +58,7 @@ SG_BEGIN_DECL()
  *  @{
  */
 
-  XBT_PUBLIC(void)  xbt_dict_set(xbt_dict_t dict, const char *key, void *data, void_f_pvoid_t *free_ctn);
+  XBT_PUBLIC(void)  xbt_dict_set(xbt_dict_t dict, const char *key, void *data, void_f_pvoid_t free_ctn);
   XBT_PUBLIC(void*) xbt_dict_get(xbt_dict_t dict,const char *key);
   XBT_PUBLIC(void*) xbt_dict_get_or_null(xbt_dict_t dict, const char *key);
 
@@ -78,7 +78,7 @@ SG_BEGIN_DECL()
   XBT_PUBLIC(void)  xbt_dict_set_ext(xbt_dict_t     dict,
                         const char     *key, int  key_len,
                         void           *data,
-                        void_f_pvoid_t *free_ctn);
+                        void_f_pvoid_t free_ctn);
   XBT_PUBLIC(void*) xbt_dict_get_ext(xbt_dict_t dict, const char *key, int key_len);
   XBT_PUBLIC(void)  xbt_dict_remove_ext(xbt_dict_t dict, const char *key, int key_len);
 
@@ -157,7 +157,7 @@ xbt_multidict_set(xbt_dict_t mdict,
 XBT_PUBLIC(void)
 xbt_multidict_set_ext(xbt_dict_t mdict,
                       xbt_dynar_t keys, xbt_dynar_t lens,
-                      void *data,void_f_pvoid_t *free_ctn);
+                      void *data,void_f_pvoid_t free_ctn);
 
 /*----[ xbt_multidict_get ]--------------------------------------------------*/
 XBT_PUBLIC(void*) xbt_multidict_get    (xbt_dict_t mdict, xbt_dynar_t keys);
index d0e2df2..5bb68dc 100644 (file)
@@ -63,9 +63,9 @@ SG_BEGIN_DECL()
 
 
   XBT_PUBLIC(xbt_dynar_t)   xbt_dynar_new(const unsigned long elm_size, 
-                                         void_f_pvoid_t const free_f);
+                                         void_f_pvoid_t const free_f);
   XBT_PUBLIC(xbt_dynar_t)   xbt_dynar_new_sync(const unsigned long elm_size, 
-                                              void_f_pvoid_t const free_f);
+                                              void_f_pvoid_t const free_f);
   XBT_PUBLIC(void)          xbt_dynar_free(xbt_dynar_t *dynar);
   XBT_PUBLIC(void)          xbt_dynar_free_voidp(void *dynar);
   XBT_PUBLIC(void)          xbt_dynar_free_container(xbt_dynar_t *dynar);
@@ -104,7 +104,7 @@ SG_BEGIN_DECL()
   XBT_PUBLIC(void) xbt_dynar_pop     (xbt_dynar_t  const dynar, void *const dst);
   XBT_PUBLIC(void) xbt_dynar_unshift (xbt_dynar_t  const dynar, const void *src);
   XBT_PUBLIC(void) xbt_dynar_shift   (xbt_dynar_t  const dynar, void *const dst);
-  XBT_PUBLIC(void) xbt_dynar_map     (const xbt_dynar_t dynar, void_f_pvoid_t     * const op);
+  XBT_PUBLIC(void) xbt_dynar_map     (const xbt_dynar_t dynar, void_f_pvoid_t const op);
 
 /** @} */
 /** @defgroup XBT_dynar_ctn Direct manipulation to the dynars content
index c12ca70..a5044bd 100644 (file)
 
 SG_BEGIN_DECL()
 
-   typedef void  (void_f_ppvoid_t)(void**);
-   typedef void  (void_f_pvoid_t) (void*);
-   typedef void* (pvoid_f_void_t)(void);
-   typedef void* (pvoid_f_pvoid_t)(void*);
-   typedef void  (void_f_void_t) (void);
+   typedef void  (*void_f_ppvoid_t)(void**);
+   typedef void  (*void_f_pvoid_t) (void*);
+   typedef void* (*pvoid_f_void_t)(void);
+   typedef void* (*pvoid_f_pvoid_t)(void*);
+   typedef void  (*void_f_void_t) (void);
 
-   typedef int   (int_f_void_t)   (void);
+   typedef int   (*int_f_void_t)   (void);
 
-   typedef int  (int_f_pvoid_pvoid_t) (void*,void*);
+   typedef int  (*int_f_pvoid_pvoid_t) (void*,void*);
 
    typedef int  (*xbt_main_func_t)(int argc, char *argv[]);
 
-   typedef void* (*pvoid_pf_void_t)(void);
-   typedef void (*void_fp_pvoid_t)(void*);
 SG_END_DECL()
 
 #endif /* XBT_FUNCTION_TYPE_H */
index 534472d..399bc21 100644 (file)
@@ -39,13 +39,13 @@ XBT_PUBLIC(double) xbt_graph_edge_get_length(xbt_edge_t e);
 XBT_PUBLIC(double*) xbt_graph_get_length_matrix(xbt_graph_t g);
 
 XBT_PUBLIC(void) xbt_graph_free_node(xbt_graph_t g, xbt_node_t n, 
-                          void_f_pvoid_t *node_free_function , void_f_pvoid_t *edge_free_function);
+                          void_f_pvoid_t node_free_function , void_f_pvoid_t edge_free_function);
 XBT_PUBLIC(void) xbt_graph_free_edge(xbt_graph_t g, xbt_edge_t e, 
-                          void_f_pvoid_t *free_function);
+                          void_f_pvoid_t free_function);
 XBT_PUBLIC(void) xbt_graph_free_graph(xbt_graph_t g, 
-                         void_f_pvoid_t *node_free_function,
-                         void_f_pvoid_t *edge_free_function,
-                         void_f_pvoid_t *graph_free_function);
+                         void_f_pvoid_t node_free_function,
+                         void_f_pvoid_t edge_free_function,
+                         void_f_pvoid_t graph_free_function);
 
 XBT_PUBLIC(int) __xbt_find_in_dynar(xbt_dynar_t dynar, void *p);
 
index 6dc6123..bce68a7 100644 (file)
 #include "xbt/graphxml.h"
 
 /* Entry-point of the graphxml parser. */
-extern int_f_void_t *xbt_graph_parse;
+extern int_f_void_t xbt_graph_parse;
 
 /* Hook for the different tags. They can be redefined at will whereas
    the versions without the _fun can't. */
-extern void_f_void_t *STag_graphxml_graph_fun;
-extern void_f_void_t *ETag_graphxml_graph_fun;
-extern void_f_void_t *STag_graphxml_node_fun;
-extern void_f_void_t *ETag_graphxml_node_fun;
-extern void_f_void_t *STag_graphxml_edge_fun;
-extern void_f_void_t *ETag_graphxml_edge_fun;
+extern void_f_void_t STag_graphxml_graph_fun;
+extern void_f_void_t ETag_graphxml_graph_fun;
+extern void_f_void_t STag_graphxml_node_fun;
+extern void_f_void_t ETag_graphxml_node_fun;
+extern void_f_void_t STag_graphxml_edge_fun;
+extern void_f_void_t ETag_graphxml_edge_fun;
 
 XBT_PUBLIC(void) xbt_graph_parse_open(const char *file);
 XBT_PUBLIC(void) xbt_graph_parse_close(void);
index 8a21d6c..99b4d7b 100644 (file)
@@ -19,7 +19,7 @@
 /* @brief heap datatype */
 typedef struct xbt_heap *xbt_heap_t;
 
-XBT_PUBLIC(xbt_heap_t) xbt_heap_new(int num, void_f_pvoid_t const free_func);
+XBT_PUBLIC(xbt_heap_t) xbt_heap_new(int num, void_f_pvoid_t const free_func);
 XBT_PUBLIC(void) xbt_heap_free(xbt_heap_t H);
 XBT_PUBLIC(int) xbt_heap_size(xbt_heap_t H);
 
index d750c1e..9a4742a 100644 (file)
@@ -20,7 +20,7 @@ typedef struct {
   unsigned long elmsize;
 
   char *data;
-  void_f_pvoid_t *free_f;
+  void_f_pvoid_t free_f;
 } s_xbt_matrix_t, *xbt_matrix_t;
 
 
@@ -35,11 +35,11 @@ typedef struct {
 
 XBT_PUBLIC(xbt_matrix_t) xbt_matrix_new(int lines, int rows, 
                            const unsigned long elmsize,
-                           void_f_pvoid_t const free_f);
+                           void_f_pvoid_t const free_f);
 XBT_PUBLIC(xbt_matrix_t) xbt_matrix_new_sub(xbt_matrix_t from,
                                int lsize, int rsize,
                                int lpos, int rpos,
-                               pvoid_f_pvoid_t *const cpy_f);
+                               pvoid_f_pvoid_t const cpy_f);
 
 XBT_PUBLIC(void) xbt_matrix_free(xbt_matrix_t matrix);
 XBT_PUBLIC(void) xbt_matrix_free_voidp(void *d);
@@ -48,7 +48,7 @@ XBT_PUBLIC(void) xbt_matrix_copy_values(xbt_matrix_t dest, xbt_matrix_t src,
                            int lsize, int rsize,
                            int lpos_dst,int rpos_dst,
                            int lpos_src,int rpos_src,
-                           pvoid_f_pvoid_t *const cpy_f);
+                           pvoid_f_pvoid_t const cpy_f);
 
 XBT_PUBLIC(void) xbt_matrix_dump(xbt_matrix_t matrix, const char *name, int coords,
                     void_f_pvoid_t display_fun);
index 8f7b0cf..0d79c10 100644 (file)
@@ -77,7 +77,7 @@ XBT_PUBLIC(void) xbt_set_free(xbt_set_t *set);
  *  @{
  */
 
-XBT_PUBLIC(void) xbt_set_add (xbt_set_t set, xbt_set_elm_t  elm, void_f_pvoid_t *free_func);
+XBT_PUBLIC(void) xbt_set_add (xbt_set_t set, xbt_set_elm_t  elm, void_f_pvoid_t free_func);
 XBT_PUBLIC(void) xbt_set_remove (xbt_set_t set, xbt_set_elm_t elm);
 XBT_PUBLIC(void) xbt_set_remove_by_name (xbt_set_t set, const char *key);
 XBT_PUBLIC(void) xbt_set_remove_by_name_ext (xbt_set_t set, const char *key, int key_len);
index 265f5b8..333df95 100644 (file)
@@ -32,7 +32,7 @@ SG_BEGIN_DECL()
   /** \brief Thread data type (opaque structure) */
   typedef struct s_xbt_thread_ *xbt_thread_t;
 
-  XBT_PUBLIC(xbt_thread_t) xbt_thread_create(const char *name, void_fp_pvoid_t start_routine,void* param);
+  XBT_PUBLIC(xbt_thread_t) xbt_thread_create(const char *name, void_f_pvoid_t start_routine,void* param);
   XBT_PUBLIC(void) xbt_thread_exit();
   XBT_PUBLIC(xbt_thread_t) xbt_thread_self(void);
   XBT_PUBLIC(const char*) xbt_thread_name(xbt_thread_t t);
index e5e12c4..d1a0fec 100644 (file)
@@ -18,7 +18,7 @@
 SG_BEGIN_DECL()
 
      /* Get the PID of the current process */
-     XBT_PUBLIC_DATA(int_f_void_t*) xbt_getpid;
+     XBT_PUBLIC_DATA(int_f_void_t) xbt_getpid;
 
 SG_END_DECL()
 
index ee432e1..446a3a9 100644 (file)
@@ -643,7 +643,7 @@ static void gras_datadesc_dynar_cb(gras_datadesc_type_t typedesc, gras_cbps_t va
  */
 gras_datadesc_type_t
 gras_datadesc_dynar(gras_datadesc_type_t elm_t,
-                   void_f_pvoid_t *free_func) {
+                   void_f_pvoid_t free_func) {
    
   char *buffname;
   gras_datadesc_type_t res;
@@ -704,7 +704,7 @@ static void gras_datadesc_matrix_cb(gras_datadesc_type_t typedesc, gras_cbps_t v
 }
 gras_datadesc_type_t
 gras_datadesc_matrix(gras_datadesc_type_t elm_t,
-                    void_f_pvoid_t const free_f) {
+                    void_f_pvoid_t const free_f) {
   char *buffname;
   gras_datadesc_type_t res;
 
index e06a297..3d5dd39 100644 (file)
@@ -198,7 +198,7 @@ static void change_to_matrix_of(xbt_dynar_t dynar,gras_datadesc_type_t subtype)
   XBT_OUT;
 }
 
-static void add_free_f(xbt_dynar_t dynar,void_f_pvoid_t* free_f) {
+static void add_free_f(xbt_dynar_t dynar,void_f_pvoid_t free_f) {
   s_identifier_t former,ref;
   memset(&ref,0,sizeof(ref));
 
@@ -474,10 +474,10 @@ static void parse_statement(char   *definition,
           if (!storage)
             PARSE_ERROR1("value for free_f annotation of field %s is not a known constant",identifier.name);
           if (identifier.tm.is_matrix == -1) {
-             add_free_f(identifiers,*(void_f_pvoid_t**)storage);
+             add_free_f(identifiers,*(void_f_pvoid_t*)storage);
              identifier.tm.is_matrix = 0;
           } else if (identifier.tm.is_dynar == -1) {
-             add_free_f(identifiers,*(void_f_pvoid_t**)storage);
+             add_free_f(identifiers,*(void_f_pvoid_t*)storage);
              identifier.tm.is_dynar = 0;
           } else {       
              PARSE_ERROR1("free_f annotation only accepted for dynars and matrices which subtype is already declared (field %s)",
index 07c1425..0bc3c5c 100644 (file)
@@ -115,7 +115,7 @@ typedef struct s_gras_msg_cb_ctx s_gras_msg_cb_ctx_t;
 typedef struct {
   double expiry;
   double period;
-  void_f_void_t *action;
+  void_f_void_t action;
   int repeat;
 } s_gras_timer_t, *gras_timer_t;
 
index 6162502..0c6aa5b 100644 (file)
@@ -150,7 +150,7 @@ double gras_msg_timer_handle(void) {
      DEBUG2("Action %p expires in %f", timer->action, untilthis);
      
      if (untilthis <= 0.0) {
-       void_f_void_t *action = timer->action;
+       void_f_void_t action = timer->action;
        
        DEBUG5("[%.0f] Serve %s action %p (%f<%f)",gras_os_time(),
              timer->repeat ? "repetitive" : "delayed", timer->action,
@@ -165,7 +165,7 @@ double gras_msg_timer_handle(void) {
         DEBUG2("[%.0f] Remove %p now that it's done", gras_os_time(), timer->action);
         xbt_dynar_cursor_rm(pd->timers, &cursor);
        }
-       action();
+       (*action)();
        return 0.0;
      } else if (untilthis < untilnext || untilnext == -1) {
        untilnext = untilthis;
index 7f426c3..8969f5e 100644 (file)
@@ -75,10 +75,10 @@ typedef struct s_gras_module {
      loading/unloading */
    
   int *p_id; /* where the module stores the libdata ID (a global somewhere), to tweak it on need */
-  void_f_void_t *init_f;  /* First time the module is referenced. */
-  void_f_void_t *exit_f;  /* When last process referencing it stops doing so. */
-  void_f_pvoid_t *join_f;  /* Called by each process in initialization phase (init_f called once for all processes) */
-  void_f_pvoid_t *leave_f; /* Called by each process in finalization phase. Should free moddata passed */
+  void_f_void_t init_f;  /* First time the module is referenced. */
+  void_f_void_t exit_f;  /* When last process referencing it stops doing so. */
+  void_f_pvoid_t join_f;  /* Called by each process in initialization phase (init_f called once for all processes) */
+  void_f_pvoid_t leave_f; /* Called by each process in finalization phase. Should free moddata passed */
 } s_gras_module_t, *gras_module_t;
 
 static xbt_set_t _gras_modules = NULL; /* content: s_gras_module_t */
@@ -106,8 +106,8 @@ static void gras_module_freep(void *p) {
  */
 
 void gras_module_add(const char *name, unsigned int datasize, int *ID,
-                    void_f_void_t  *init_f, void_f_void_t  *exit_f,
-                    void_f_pvoid_t *join_f, void_f_pvoid_t *leave_f) {
+                    void_f_void_t  init_f, void_f_void_t  exit_f,
+                    void_f_pvoid_t join_f, void_f_pvoid_t leave_f) {
   gras_module_t mod=NULL;
   xbt_ex_t e;
   volatile int found = 0;
index 8daf4b7..b87a118 100644 (file)
@@ -23,8 +23,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(gras_virtu_process,gras_virtu,"Process manipulat
 /* Functions to handle gras_procdata_t->libdata cells*/
 typedef struct {
    char *name;
-   pvoid_f_void_t *constructor;
-   void_f_pvoid_t *destructor;
+   pvoid_f_void_t constructor;
+   void_f_pvoid_t destructor;
 } s_gras_procdata_fabric_t, *gras_procdata_fabric_t;
 
 static xbt_dynar_t _gras_procdata_fabrics = NULL; /* content: s_gras_procdata_fabric_t */
@@ -144,7 +144,7 @@ gras_procdata_init() {
       THROW1(unknown_error,0,"MayDay: two modules use '%s' as libdata name", fab.name);
     
     /* Add the data in place, after some more sanity checking */
-    elem = (fab.constructor)();
+    elem = (*fab.constructor)();
     if (elem->name_len && elem->name_len != strlen(elem->name)) {
        elem->name_len = strlen(elem->name);
        WARN1("Module '%s' constructor is borken: it does not set elem->name_len",
index 616db0a..2b75029 100644 (file)
@@ -45,15 +45,15 @@ XBT_PUBLIC(void) __SIMIX_main(void);
  * int argc, char **argv: parameters passed to code
  *
  * */
-typedef void *(smx_creation_func_t)(/*name*/     const char *,
+typedef void *(*smx_creation_func_t)(/*name*/     const char *,
                                     /*code*/     xbt_main_func_t, 
                                     /*userdata*/ void *,
                                     /*hostname*/ char *, 
                                     /* argc */   int,
                                     /* argv */   char **);
-XBT_PUBLIC(void) SIMIX_function_register_process_create(smx_creation_func_t *function);
-XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_f_pvoid_t *function);
-XBT_PUBLIC(void) SIMIX_function_register_process_cleanup(void_f_pvoid_t *function);
+XBT_PUBLIC(void) SIMIX_function_register_process_create(smx_creation_func_t function);
+XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_f_pvoid_t function);
+XBT_PUBLIC(void) SIMIX_function_register_process_cleanup(void_f_pvoid_t function);
 
 /************************** Host handling ***********************************/
 
index dedb6ba..6938efd 100644 (file)
@@ -38,9 +38,9 @@ typedef struct SIMIX_Global {
 
   smx_process_t current_process;
   xbt_dict_t registered_functions;
-  smx_creation_func_t *create_process_function;
-  void_f_pvoid_t *kill_process_function;
-  void_f_pvoid_t *cleanup_process_function;
+  smx_creation_func_t create_process_function;
+  void_f_pvoid_t kill_process_function;
+  void_f_pvoid_t cleanup_process_function;
 } s_SIMIX_Global_t, *SIMIX_Global_t;
 
 extern SIMIX_Global_t simix_global;
index 61c03d7..3771300 100644 (file)
@@ -77,7 +77,7 @@ static void parse_process_finalize(void)
 
     if (simix_global->create_process_function)
       process =
-         simix_global->create_process_function(parse_argv[0], parse_code,
+        (*simix_global->create_process_function)(parse_argv[0], parse_code,
                                                NULL, parse_host,
                                                parse_argc, parse_argv);
     else
index e381b94..51290f0 100644 (file)
@@ -456,7 +456,7 @@ int SIMIX_timer_get(void **function, void **arg)
  *     \param function Create process function
  *
  */
-void SIMIX_function_register_process_create(smx_creation_func_t function)
+void SIMIX_function_register_process_create(smx_creation_func_t function)
 {
   xbt_assert0((simix_global->create_process_function == NULL),
              "Data already set");
@@ -471,7 +471,7 @@ void SIMIX_function_register_process_create(smx_creation_func_t * function)
  *     \param function Kill process function
  *
  */
-void SIMIX_function_register_process_kill(void_f_pvoid_t function)
+void SIMIX_function_register_process_kill(void_f_pvoid_t function)
 {
   xbt_assert0((simix_global->kill_process_function == NULL),
              "Data already set");
@@ -486,7 +486,7 @@ void SIMIX_function_register_process_kill(void_f_pvoid_t * function)
  *     \param function cleanup process function
  *
  */
-void SIMIX_function_register_process_cleanup(void_f_pvoid_t function)
+void SIMIX_function_register_process_cleanup(void_f_pvoid_t function)
 {
   simix_global->cleanup_process_function = function;
 }
index 54a0295..863a15b 100644 (file)
@@ -24,22 +24,22 @@ void nil_function(void)
   return;
 }
 
-void_f_void_t *STag_surfxml_platform_description_fun = nil_function;
-void_f_void_t *ETag_surfxml_platform_description_fun = nil_function;
-void_f_void_t *STag_surfxml_cpu_fun = nil_function;
-void_f_void_t *ETag_surfxml_cpu_fun = nil_function;
-void_f_void_t *STag_surfxml_router_fun = nil_function;
-void_f_void_t *ETag_surfxml_router_fun = nil_function;
-void_f_void_t *STag_surfxml_network_link_fun = nil_function;
-void_f_void_t *ETag_surfxml_network_link_fun = nil_function;
-void_f_void_t *STag_surfxml_route_fun = nil_function;
-void_f_void_t *ETag_surfxml_route_fun = nil_function;
-void_f_void_t *STag_surfxml_route_element_fun = nil_function;
-void_f_void_t *ETag_surfxml_route_element_fun = nil_function;
-void_f_void_t *STag_surfxml_process_fun = nil_function;
-void_f_void_t *ETag_surfxml_process_fun = nil_function;
-void_f_void_t *STag_surfxml_argument_fun = nil_function;
-void_f_void_t *ETag_surfxml_argument_fun = nil_function;
+void_f_void_t STag_surfxml_platform_description_fun = nil_function;
+void_f_void_t ETag_surfxml_platform_description_fun = nil_function;
+void_f_void_t STag_surfxml_cpu_fun = nil_function;
+void_f_void_t ETag_surfxml_cpu_fun = nil_function;
+void_f_void_t STag_surfxml_router_fun = nil_function;
+void_f_void_t ETag_surfxml_router_fun = nil_function;
+void_f_void_t STag_surfxml_network_link_fun = nil_function;
+void_f_void_t ETag_surfxml_network_link_fun = nil_function;
+void_f_void_t STag_surfxml_route_fun = nil_function;
+void_f_void_t ETag_surfxml_route_fun = nil_function;
+void_f_void_t STag_surfxml_route_element_fun = nil_function;
+void_f_void_t ETag_surfxml_route_element_fun = nil_function;
+void_f_void_t STag_surfxml_process_fun = nil_function;
+void_f_void_t ETag_surfxml_process_fun = nil_function;
+void_f_void_t STag_surfxml_argument_fun = nil_function;
+void_f_void_t ETag_surfxml_argument_fun = nil_function;
 
 YY_BUFFER_STATE surf_input_buffer;
 FILE *surf_file_to_parse;
@@ -106,82 +106,82 @@ void STag_surfxml_platform_description(void)
              "Last, do not forget to also update your values for "
              "the calls to MSG_task_create (if any).");
 
-  STag_surfxml_platform_description_fun();
+  (*STag_surfxml_platform_description_fun)();
 }
 
 void ETag_surfxml_platform_description(void)
 {
-  ETag_surfxml_platform_description_fun();
+  (*ETag_surfxml_platform_description_fun)();
 }
 
 void STag_surfxml_cpu(void)
 {
-  STag_surfxml_cpu_fun();
+  (*STag_surfxml_cpu_fun)();
 }
 
 void ETag_surfxml_cpu(void)
 {
-  ETag_surfxml_cpu_fun();
+  (*ETag_surfxml_cpu_fun)();
 }
 
 void STag_surfxml_router(void)
 {
-  STag_surfxml_router_fun();
+  (*STag_surfxml_router_fun)();
 }
 
 void ETag_surfxml_router(void)
 {
-  ETag_surfxml_router_fun();
+  (*ETag_surfxml_router_fun)();
 }
 
 void STag_surfxml_network_link(void)
 {
-  STag_surfxml_network_link_fun();
+  (*STag_surfxml_network_link_fun)();
 }
 
 void ETag_surfxml_network_link(void)
 {
-  ETag_surfxml_network_link_fun();
+  (*ETag_surfxml_network_link_fun)();
 }
 
 void STag_surfxml_route(void)
 {
-  STag_surfxml_route_fun();
+  (*STag_surfxml_route_fun)();
 }
 
 void ETag_surfxml_route(void)
 {
-  ETag_surfxml_route_fun();
+  (*ETag_surfxml_route_fun)();
 }
 
 void STag_surfxml_route_element(void)
 {
-  STag_surfxml_route_element_fun();
+  (*STag_surfxml_route_element_fun)();
 }
 
 void ETag_surfxml_route_element(void)
 {
-  ETag_surfxml_route_element_fun();
+  (*ETag_surfxml_route_element_fun)();
 }
 
 void STag_surfxml_process(void)
 {
-  STag_surfxml_process_fun();
+  (*STag_surfxml_process_fun)();
 }
 
 void ETag_surfxml_process(void)
 {
-  ETag_surfxml_process_fun();
+  (*ETag_surfxml_process_fun)();
 }
 
 void STag_surfxml_argument(void)
 {
-  STag_surfxml_argument_fun();
+  (*STag_surfxml_argument_fun)();
 }
 
 void ETag_surfxml_argument(void)
 {
-  ETag_surfxml_argument_fun();
+  (*ETag_surfxml_argument_fun)();
 }
 
 void surf_parse_open(const char *file)
@@ -226,7 +226,7 @@ static int _surf_parse(void)
   return surf_parse_lex();
 }
 
-int_f_void_t *surf_parse = _surf_parse;
+int_f_void_t surf_parse = _surf_parse;
 
 void surf_parse_get_double(double *value, const char *string)
 {
index 96a4861..ebaba60 100644 (file)
@@ -57,9 +57,9 @@ typedef struct s_xbt_context {
        char **argv;
    
        /* Init/exit functions */   
-       void_f_pvoid_t *startup_func;
+       void_f_pvoid_t startup_func;
        void *startup_arg;
-       void_f_pvoid_t *cleanup_func;
+       void_f_pvoid_t cleanup_func;
        void *cleanup_arg;
 
        int iwannadie;                  /* Set to true by the context when it wants to commit suicide */
index 85748d1..36e9151 100644 (file)
@@ -165,11 +165,11 @@ static unsigned int xbt_dict_hash(const char *str) {
  * Set the \a data in the structure under the \a key, which can be any kind 
  * of data, as long as its length is provided in \a key_len.
  */
-void xbt_dict_set_ext(xbt_dict_t      dict,
+void xbt_dict_set_ext(xbt_dict_t       dict,
                      const char      *key,
                      int              key_len,
                      void            *data,
-                     void_f_pvoid_t  *free_ctn) {
+                     void_f_pvoid_t   free_ctn) {
 
   unsigned int hash_code;
   xbt_dictelm_t current, previous = NULL;
@@ -217,10 +217,10 @@ void xbt_dict_set_ext(xbt_dict_t      dict,
  * set the \a data in the structure under the \a key, which is a 
  * null terminated string.
  */
-void xbt_dict_set(xbt_dict_t     dict,
+void xbt_dict_set(xbt_dict_t      dict,
                  const char     *key,
                  void           *data,
-                 void_f_pvoid_t *free_ctn) {
+                 void_f_pvoid_t  free_ctn) {
 
   xbt_assert(dict);
   
@@ -438,7 +438,7 @@ void xbt_dict_add_element(xbt_dict_t dict, xbt_dictelm_t element) {
  */
 
 void xbt_dict_dump(xbt_dict_t     dict,
-                  void_f_pvoid_t *output) {
+                  void_f_pvoid_t output) {
   int i;
   xbt_dictelm_t element;
   printf("Dict %p:\n", dict);
@@ -448,7 +448,7 @@ void xbt_dict_dump(xbt_dict_t     dict,
       while (element != NULL) {
        printf("%s -> ", element->key);
        if (output != NULL) {
-         output(element->content);
+         (*output)(element->content);
        }
        printf("\n");
        element = element->next;
index 2ee799c..a80a226 100644 (file)
@@ -30,7 +30,7 @@ static void _free_dict(void*d) {
 void
 xbt_multidict_set_ext(xbt_dict_t  mdict,
                       xbt_dynar_t keys, xbt_dynar_t     lens,
-                      void       *data, void_f_pvoid_t *free_ctn) {
+                      void       *data, void_f_pvoid_t  free_ctn) {
       
   xbt_ex_t e;
   xbt_dict_t thislevel,nextlevel=NULL;
@@ -85,7 +85,7 @@ xbt_multidict_set_ext(xbt_dict_t  mdict,
 void
 xbt_multidict_set(xbt_dict_t  mdict,
                   xbt_dynar_t keys,
-                  void       *data,  void_f_pvoid_t *free_ctn) {
+                  void       *data,  void_f_pvoid_t free_ctn) {
   xbt_dynar_t lens = xbt_dynar_new(sizeof(unsigned long int),NULL);
   int i;
   xbt_ex_t e;
index 7869357..70e62fa 100644 (file)
@@ -24,7 +24,7 @@ typedef struct xbt_dictelm_ {
   char *key;
   int key_len;
   void *content;
-  void_f_pvoid_t *free_f;
+  void_f_pvoid_t free_f;
   xbt_dictelm_t next;
 } s_xbt_dictelm_t;
 
index 96be789..6abfd76 100644 (file)
@@ -54,7 +54,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dyn,xbt,"Dynamic arrays");
                     "dynar %p is empty", dynar)
 
 static void _dynar_map(const xbt_dynar_t  dynar,
-                      void_f_pvoid_t     const op);
+                      void_f_pvoid_t     const op);
 
 static XBT_INLINE 
 void _xbt_clear_mem(void * const ptr,
@@ -182,7 +182,7 @@ xbt_dynar_dump(xbt_dynar_t dynar) {
  */
 xbt_dynar_t 
 xbt_dynar_new(const unsigned long elmsize,
-               void_f_pvoid_t const free_f) {
+               void_f_pvoid_t const free_f) {
    
   xbt_dynar_t dynar = xbt_new0(s_xbt_dynar_t,1);
 
@@ -203,7 +203,7 @@ xbt_dynar_new(const unsigned long elmsize,
  */
 xbt_dynar_t 
 xbt_dynar_new_sync(const unsigned long elmsize,
-               void_f_pvoid_t const free_f) {
+               void_f_pvoid_t const free_f) {
    xbt_dynar_t res = xbt_dynar_new(elmsize,free_f);
    res->mutex = xbt_mutex_init();
    return res;
@@ -617,7 +617,7 @@ xbt_dynar_shift(xbt_dynar_t  const dynar,
 }
 
 static void _dynar_map(const xbt_dynar_t  dynar,
-                      void_f_pvoid_t     const op) {
+                      void_f_pvoid_t     const op) {
   char         elm[SIZEOF_MAX];
   const unsigned long used = dynar->used;
   unsigned long       i    = 0;
@@ -639,7 +639,7 @@ static void _dynar_map(const xbt_dynar_t  dynar,
  */
 void
 xbt_dynar_map(const xbt_dynar_t  dynar,
-               void_f_pvoid_t     * const op) {
+               void_f_pvoid_t    const op) {
 
   _dynar_lock(dynar);
   _sanity_check_dynar(dynar);
index 46ad623..85edb74 100644 (file)
@@ -16,7 +16,7 @@ typedef struct xbt_dynar_s {
   unsigned long          used;
   unsigned long          elmsize;
   void           *data;
-  void_f_pvoid_t *free_f;
+  void_f_pvoid_t free_f;
   xbt_mutex_t    mutex;
 } s_xbt_dynar_t;
 
index b106f50..1237288 100644 (file)
@@ -127,9 +127,9 @@ void xbt_graph_edge_set_data(xbt_edge_t edge, void *data)
  * Free the graph structure. 
  */
 void xbt_graph_free_graph(xbt_graph_t g,
-                         void_f_pvoid_t node_free_function,
-                         void_f_pvoid_t edge_free_function,
-                         void_f_pvoid_t graph_free_function)
+                         void_f_pvoid_t node_free_function,
+                         void_f_pvoid_t edge_free_function,
+                         void_f_pvoid_t graph_free_function)
 {
   int cursor = 0;
   xbt_node_t node = NULL;
@@ -155,7 +155,8 @@ void xbt_graph_free_graph(xbt_graph_t g,
   xbt_dynar_foreach(g->edges, cursor, edge)
       free(edge);
   xbt_dynar_free(&(g->edges));
-  if(graph_free_function) (*graph_free_function)(g->data);
+  if(graph_free_function) 
+     (*graph_free_function)(g->data);
   free(g);
 
   return;
@@ -164,8 +165,8 @@ void xbt_graph_free_graph(xbt_graph_t g,
 
 /** @brief remove the given node from the given graph */
 void xbt_graph_free_node(xbt_graph_t g, xbt_node_t n,
-                        void_f_pvoid_t node_free_function,
-                        void_f_pvoid_t edge_free_function)
+                        void_f_pvoid_t node_free_function,
+                        void_f_pvoid_t edge_free_function)
 {
   unsigned long nbr;
   int i;
@@ -185,7 +186,7 @@ void xbt_graph_free_node(xbt_graph_t g, xbt_node_t n,
   }
 
   if ((node_free_function) && (n->data))
-    node_free_function(n->data);
+    (*node_free_function)(n->data);
 
   cursor = 0;
   xbt_dynar_foreach(g->nodes, cursor, node)
@@ -202,7 +203,7 @@ void xbt_graph_free_node(xbt_graph_t g, xbt_node_t n,
 
 /** @brief remove the given edge from the given graph */
 void xbt_graph_free_edge(xbt_graph_t g, xbt_edge_t e,
-                        void_f_pvoid_t *free_function)
+                        void_f_pvoid_t free_function)
 {
   int idx;
   int cursor = 0;
@@ -598,10 +599,10 @@ static void __parse_edge(void)
 
 /** @brief Import a graph from a file following the GraphXML format */
 xbt_graph_t xbt_graph_read(const char *filename,
-                          void *(node_label_and_data) (xbt_node_t,
+                          void *(*node_label_and_data) (xbt_node_t,
                                                        const char *,
                                                        const char *),
-                          void *(edge_label_and_data) (xbt_edge_t,
+                          void *(*edge_label_and_data) (xbt_edge_t,
                                                        const char *,
                                                        const char *))
 {
index 98fe312..b03c097 100644 (file)
@@ -26,12 +26,12 @@ static void nil_function(void)
   return;
 }
 
-void_f_void_t *STag_graphxml_graph_fun = nil_function;
-void_f_void_t *ETag_graphxml_graph_fun = nil_function;
-void_f_void_t *STag_graphxml_node_fun = nil_function;
-void_f_void_t *ETag_graphxml_node_fun = nil_function;
-void_f_void_t *STag_graphxml_edge_fun = nil_function;
-void_f_void_t *ETag_graphxml_edge_fun = nil_function;
+void_f_void_t STag_graphxml_graph_fun = nil_function;
+void_f_void_t ETag_graphxml_graph_fun = nil_function;
+void_f_void_t STag_graphxml_node_fun = nil_function;
+void_f_void_t ETag_graphxml_node_fun = nil_function;
+void_f_void_t STag_graphxml_edge_fun = nil_function;
+void_f_void_t ETag_graphxml_edge_fun = nil_function;
 
 YY_BUFFER_STATE xbt_graph_input_buffer;
 FILE *xbt_graph_file_to_parse;
@@ -48,34 +48,34 @@ void xbt_graph_parse_reset_parser(void)
 
 void STag_graphxml_graph(void)
 {
-  STag_graphxml_graph_fun();
+  (*STag_graphxml_graph_fun)();
 }
 
 void ETag_graphxml_graph(void)
 {
-  ETag_graphxml_graph_fun();
+  (*ETag_graphxml_graph_fun)();
 }
 
 
 void STag_graphxml_node(void)
 {
-  STag_graphxml_node_fun();
+  (*STag_graphxml_node_fun)();
 }
 
 void ETag_graphxml_node(void)
 {
-  ETag_graphxml_node_fun();
+  (*ETag_graphxml_node_fun)();
 }
 
 
 void STag_graphxml_edge(void)
 {
-  STag_graphxml_edge_fun();
+  (*STag_graphxml_edge_fun)();
 }
 
 void ETag_graphxml_edge(void)
 {
-  ETag_graphxml_edge_fun();
+  (*ETag_graphxml_edge_fun)();
 }
 
 
@@ -115,7 +115,7 @@ static int _xbt_graph_parse(void)
   return xbt_graph_parse_lex();
 }
 
-int_f_void_t *xbt_graph_parse = _xbt_graph_parse;
+int_f_void_t xbt_graph_parse = _xbt_graph_parse;
 
 void xbt_graph_parse_get_double(double *value,const char *string)
 { 
index 19db011..747b2e3 100644 (file)
@@ -26,7 +26,7 @@
  *
  * Creates a new heap.
  */
-xbt_heap_t xbt_heap_new(int init_size, void_f_pvoid_t const free_func)
+xbt_heap_t xbt_heap_new(int init_size, void_f_pvoid_t const free_func)
 {
   xbt_heap_t H = xbt_new0(struct xbt_heap, 1);
   H->size = init_size;
@@ -45,7 +45,7 @@ void xbt_heap_free(xbt_heap_t H)
   int i;
   if (H->free)
     for (i = 0; i < H->count; i++)
-      H->free(H->items[i].content);
+      (*H->free)(H->items[i].content);
   free(H->items);
   free(H);
   return;
index 72389dc..026cbb4 100644 (file)
@@ -20,7 +20,7 @@ typedef struct xbt_heap {
   int size;
   int count;
   xbt_heapItem_t items;
-  void_f_pvoid_t *free;
+  void_f_pvoid_t free;
 } s_xbt_heap_t;
 
 #define PARENT(i)  i/2
index bd5aedd..35b96d4 100644 (file)
@@ -5,9 +5,9 @@ typedef struct s_xbt_mallocator {
   int current_size;       /* number of objects currently stored */
   void **objects;         /* objects stored by the mallocator and available for the user */
   int max_size;           /* maximum number of objects */
-  pvoid_f_void_t *new_f;   /* function to call when we are running out of objects */
-  void_f_pvoid_t *free_f;  /* function to call when we have got too many objects */
-  void_f_pvoid_t *reset_f; /* function to call when an object is released by the user */
+  pvoid_f_void_t new_f;   /* function to call when we are running out of objects */
+  void_f_pvoid_t free_f;  /* function to call when we have got too many objects */
+  void_f_pvoid_t reset_f; /* function to call when an object is released by the user */
 } s_xbt_mallocator_t;
 
 #endif
index 6578127..4230a6c 100644 (file)
@@ -78,7 +78,7 @@ static int _xbt_set_get_id(xbt_set_t set) {
  */
 void xbt_set_add    (xbt_set_t      set,
                      xbt_set_elm_t  elm,
-                     void_f_pvoid_t *free_func) {
+                     void_f_pvoid_t free_func) {
 
   int found = 1;
   xbt_set_elm_t found_in_dict = NULL;
index ff2c3c8..b644d3b 100644 (file)
@@ -17,7 +17,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_matrix,xbt,"2D data storage");
 /** \brief constructor */
 xbt_matrix_t xbt_matrix_new(int lines, int rows, 
                            const unsigned long elmsize,
-                           void_f_pvoid_t const free_f)  {
+                           void_f_pvoid_t const free_f)  {
    xbt_matrix_t res=xbt_new(s_xbt_matrix_t, 1);
    res->lines   = lines;
    res->rows    = rows;
@@ -31,7 +31,7 @@ xbt_matrix_t xbt_matrix_new(int lines, int rows,
 xbt_matrix_t xbt_matrix_new_sub(xbt_matrix_t from, 
                                int lsize, int rsize,
                                int lpos, int rpos,
-                               pvoid_f_pvoid_t *const cpy_f) {
+                               pvoid_f_pvoid_t const cpy_f) {
    
    xbt_matrix_t res=xbt_matrix_new(lsize,rsize,
                                   from->elmsize, from->free_f);
@@ -73,7 +73,7 @@ void xbt_matrix_dump(xbt_matrix_t matrix, const char*name, int coords,
         fprintf(stderr," (%d,%d)=",i,j);
        else 
         fprintf(stderr," ");
-       display_fun(xbt_matrix_get_ptr(matrix,i,j));
+       (*display_fun)(xbt_matrix_get_ptr(matrix,i,j));
     }
     fprintf(stderr,"\n");
   }
@@ -97,7 +97,7 @@ void xbt_matrix_copy_values(xbt_matrix_t dst, xbt_matrix_t src,
                            int lsize, int rsize,
                            int lpos_dst,int rpos_dst,
                            int lpos_src,int rpos_src,
-                           pvoid_f_pvoid_t *const cpy_f) {
+                           pvoid_f_pvoid_t const cpy_f) {
    int i,j;
    
    DEBUG10("Copy a %dx%d submatrix from %dx%d(of %dx%d) to %dx%d (of %dx%d)",
@@ -119,7 +119,7 @@ void xbt_matrix_copy_values(xbt_matrix_t dst, xbt_matrix_t src,
    for (i=0;i<rsize;i++) {
       if (cpy_f) {
         for (j=0;j<lsize;j++)
-          xbt_matrix_get_as(dst,j+lpos_dst,i+rpos_dst,void*) = cpy_f(xbt_matrix_get_ptr(src,j+rpos_src,i+lpos_src));
+          xbt_matrix_get_as(dst,j+lpos_dst,i+rpos_dst,void*) = (*cpy_f)(xbt_matrix_get_ptr(src,j+rpos_src,i+lpos_src));
       } else {
         memcpy(xbt_matrix_get_ptr(dst,lpos_dst,i+rpos_dst),
                xbt_matrix_get_ptr(src,lpos_src,i+rpos_src),
index 115d29b..4a793e4 100644 (file)
@@ -29,7 +29,7 @@ typedef struct xbt_os_thread_ {
    pthread_t t;
    char *name;
    void *param;
-   pvoid_f_pvoid_t *start_routine;
+   pvoid_f_pvoid_t start_routine;
    ex_ctx_t *exception;
 } s_xbt_os_thread_t ;
 static xbt_os_thread_t main_thread = NULL;
@@ -93,7 +93,7 @@ static void * wrapper_start_routine(void *s) {
   if ((errcode=pthread_setspecific(xbt_self_thread_key,t)))
     THROW0(system_error,errcode,
           "pthread_setspecific failed for xbt_self_thread_key");   
-  return t->start_routine(t->param);
+  return (*t->start_routine)(t->param);
 }
 xbt_os_thread_t xbt_os_thread_create(const char*name,
                                     pvoid_f_pvoid_t start_routine,
@@ -294,7 +294,7 @@ typedef struct xbt_os_thread_ {
   char *name;
   HANDLE handle;                  /* the win thread handle        */
   unsigned long id;               /* the win thread id            */
-  pvoid_f_pvoid_t *start_routine;
+  pvoid_f_pvoid_t start_routine;
   void* param;
 } s_xbt_os_thread_t ;
 
index 3aaca7d..ad230a7 100644 (file)
@@ -24,7 +24,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync_rl,xbt,"Synchronization mechanism (RL)"
 
 typedef struct s_xbt_thread_ {   
    xbt_os_thread_t os_thread;
-   void_f_pvoid_t *code;
+   void_f_pvoid_t code;
    void *userparam;   
 }s_xbt_thread_t;
 
@@ -36,7 +36,7 @@ static void *xbt_thread_create_wrapper(void *p)  {
 }
 
 
-xbt_thread_t xbt_thread_create(const char*name,void_f_pvoid_t* code, void* param) {
+xbt_thread_t xbt_thread_create(const char*name,void_f_pvoid_t code, void* param) {
 
    xbt_thread_t res = xbt_new0(s_xbt_thread_t,1);
    res->userparam = param;
index cf4c3b3..09e8961 100644 (file)
@@ -23,7 +23,7 @@
 typedef struct s_xbt_thread_ {
    char *name;
    smx_process_t s_process;
-   void_f_pvoid_t *code;
+   void_f_pvoid_t code;
    void *userparam;
         void *father_data;
 } s_xbt_thread_t;
@@ -35,7 +35,7 @@ static int xbt_thread_create_wrapper(int argc, char *argv[]) {
    return 0;
 }
 
-xbt_thread_t xbt_thread_create(const char*name,void_fp_pvoid_t code, void* param)  {
+xbt_thread_t xbt_thread_create(const char*name,void_f_pvoid_t code, void* param)  {
    xbt_thread_t res = xbt_new0(s_xbt_thread_t,1);
    res->name = xbt_strdup(name);
    res->userparam = param;
index 0e05bd3..bed1aca 100644 (file)
@@ -15,5 +15,5 @@ static int xbt_fake_pid(void) {
    return 0;
 }
 
-int_f_void_t *xbt_getpid=&xbt_fake_pid;
+int_f_void_t xbt_getpid=xbt_fake_pid;