Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[smpi] Change parallel arrays into array of structs
[simgrid.git] / src / smpi / private.h
index 9d1c77d..ac6811a 100644 (file)
@@ -393,7 +393,7 @@ extern char* start_data_exe; //start of the data+bss segment of the executable
 extern int size_data_exe; //size of the data+bss segment of the executable
 
 
-void switch_data_segment(int);
+void smpi_switch_data_segment(int);
 void smpi_get_executable_global_size(void);
 void smpi_initialize_global_memory_segments(void);
 void smpi_destroy_global_memory_segments(void);
@@ -690,10 +690,22 @@ void TRACE_smpi_finalize(int rank);
 const char* encode_datatype(MPI_Datatype datatype);
 
 // TODO, make this static and expose it more cleanly
-extern void** mappings;
-extern int loaded_page;
 
-int smpi_process_index_of_smx_process(smx_process_t process);
+typedef struct s_smpi_privatisation_region {
+  void* address;
+  int file_descriptor;
+} *smpi_privatisation_region_t;
+
+extern smpi_privatisation_region_t smpi_privatisation_regions;
+
+extern int smpi_loaded_page;
+
+int SIMIX_process_get_PID(smx_process_t self);
+
+static inline __attribute__ ((always_inline))
+int smpi_process_index_of_smx_process(smx_process_t process) {
+  return SIMIX_process_get_PID(process) -1;
+}
 
 SG_END_DECL()