X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5c8ede40c4f5e920bd12b2e4ede74db2892e0d60..7f28d0c88e047b142cfc7d5f73c19762cb27c0c5:/include/smpi/smpi_cocci.h diff --git a/include/smpi/smpi_cocci.h b/include/smpi/smpi_cocci.h index 29daeec643..1cce1a676d 100644 --- a/include/smpi/smpi_cocci.h +++ b/include/smpi/smpi_cocci.h @@ -9,8 +9,8 @@ /* Macros used by coccinelle-generated code */ -#define SMPI_INITIALIZE_GLOBAL(name,type) \ - NULL; \ +#define SMPI_VARINIT_GLOBAL(name,type) \ +type *name = NULL; \ void __attribute__((weak,constructor)) __preinit_##name(void) { \ if(!name) \ name = (type*)malloc(smpi_global_size() * sizeof(type)); \ @@ -20,8 +20,8 @@ void __attribute__((weak,destructor)) __postfini_##name(void) { \ name = NULL; \ } -#define SMPI_INITIALIZE_AND_SET_GLOBAl(name,type,expr) \ - NULL; \ +#define SMPI_VARINIT_GLOBAL_AND_SET(name,type,expr) \ +type *name = NULL; \ void __attribute__((weak,constructor)) __preinit_##name(void) { \ size_t size = smpi_global_size(); \ size_t i; \ @@ -38,6 +38,6 @@ void __attribute__((weak,destructor)) __postfini_##name(void) { \ name = NULL; \ } -#define SMPI_GLOBAL_VAR_LOCAL_ACCESS(name) name[smpi_process_index()] +#define SMPI_VARGET_GLOBAL(name) name[smpi_process_index()] #endif