Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove an useless pimple around exceptions
[simgrid.git] / src / simix / smx_private.h
index 89efe32..0e542ca 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _SIMIX_PRIVATE_H
 #define _SIMIX_PRIVATE_H
 
+#include "src/internal_config.h"
 #include "simgrid/simix.h"
 #include "surf/surf.h"
 #include "xbt/base.h"
@@ -26,6 +27,8 @@
 #include "popping_private.h"
 #include "smx_synchro_private.h"
 
+#include <signal.h>
+
 #ifdef __cplusplus
 
 #include <simgrid/simix.hpp>
@@ -53,16 +56,6 @@ typedef struct s_smx_context_factory *smx_context_factory_t;
 
 SG_BEGIN_DECL()
 
-/* Define only for SimGrid benchmarking purposes */
-//#define TIME_BENCH_PER_SR     /* this aims at measuring the time spent in each scheduling round per each thread. The code is thus run in sequential to bench separately each SSR */
-//#define TIME_BENCH_AMDAHL     /* this aims at measuring the porting of time that could be parallelized at maximum (to get the optimal speedup by applying the amdahl law). */
-//#define ADAPTIVE_THRESHOLD    /* this is to enable the adaptive threshold algorithm in raw contexts*/
-//#define TIME_BENCH_ENTIRE_SRS /* more general benchmark than TIME_BENCH_PER_SR. It aims to measure the total time spent in a whole scheduling round (including synchro costs)*/
-
-#ifdef TIME_BENCH_PER_SR
-XBT_PRIVATE void smx_ctx_raw_new_sr(void);
-#endif
-
 /********************************** Simix Global ******************************/
 typedef struct s_smx_global {
   smx_context_factory_t context_factory;
@@ -78,11 +71,6 @@ typedef struct s_smx_global {
   void_pfn_smxprocess_t cleanup_process_function;
   xbt_mallocator_t synchro_mallocator;
 
-#ifdef TIME_BENCH_AMDAHL
-  xbt_os_timer_t timer_seq; /* used to bench the sequential and parallel parts of the simulation, if requested to */
-  xbt_os_timer_t timer_par;
-#endif
-
   xbt_os_mutex_t mutex;
 } s_smx_global_t, *smx_global_t;
 
@@ -100,8 +88,6 @@ XBT_PUBLIC(void) SIMIX_clean(void);
     _smx_throw_issuer->doexception = 1;                                 \
   } else ((void)0)
 
-#define SMX_THROW() RETHROW
-
 /* ******************************** File ************************************ */
 typedef struct s_smx_file {
   surf_file_t surf_file;
@@ -152,11 +138,11 @@ typedef struct s_smx_synchro {
 
     struct {
       e_smx_comm_type_t type;         /* Type of the communication (SIMIX_COMM_SEND or SIMIX_COMM_RECEIVE) */
-      smx_mailbox_t rdv;                  /* Rendez-vous where the comm is queued */
+      smx_mailbox_t mbox;             /* Rendez-vous where the comm is queued */
 
-#ifdef HAVE_MC
-      smx_mailbox_t rdv_cpy;              /* Copy of the rendez-vous where the comm is queued, MC needs it for DPOR
-                                         (comm.rdv set to NULL when the communication is removed from the mailbox
+#if HAVE_MC
+      smx_mailbox_t mbox_cpy;         /* Copy of the rendez-vous where the comm is queued, MC needs it for DPOR
+                                         (comm.mbox set to NULL when the communication is removed from the mailbox
                                          (used as garbage collector)) */
 #endif
       int refcount;                   /* Number of processes involved in the cond */
@@ -221,7 +207,7 @@ XBT_PUBLIC_DATA(char sigsegv_stack[SIGSTKSZ]);
 /* We are using the bottom of the stack to save some information, like the
  * valgrind_stack_id. Define smx_context_usable_stack_size to give the remaining
  * size for the stack. */
-#ifdef HAVE_VALGRIND_VALGRIND_H
+#if HAVE_VALGRIND_H
 # define smx_context_usable_stack_size                                  \
   (smx_context_stack_size - sizeof(unsigned int)) /* for valgrind_stack_id */
 #else