Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SIMIX refactoring: replace 'request' by a more precise term: 'simcall'
authorChristophe Thiéry <christopho128@gmail.com>
Wed, 25 Jan 2012 17:56:52 +0000 (18:56 +0100)
committerChristophe Thiéry <christopho128@gmail.com>
Wed, 25 Jan 2012 17:56:52 +0000 (18:56 +0100)
All functions that make a system call (or simcall) are now simcall_*
(instead of SIMIX_req_*). They all interrupt the execution flow until
the kernel answers the simcall.
Let's hope that SIMIX will be easier to understand ;)

46 files changed:
examples/msg/actions/actions.c
include/simix/simix.h
src/gras/Msg/sg_msg.c
src/gras/Transport/sg_transport.c
src/gras/Transport/transport_plugin_sg.c
src/gras/Virtu/sg_emul.c
src/gras/Virtu/sg_process.c
src/instr/instr_private.h
src/mc/mc_dpor.c
src/mc/mc_global.c
src/mc/mc_liveness.c
src/mc/mc_request.c
src/mc/mc_state.c
src/mc/private.h
src/msg/msg_environment.c
src/msg/msg_global.c
src/msg/msg_gos.c
src/msg/msg_host.c
src/msg/msg_mailbox.c
src/msg/msg_private.h
src/msg/msg_process.c
src/msg/msg_task.c
src/simix/README_attempt_without_stack
src/simix/smx_context_base.c
src/simix/smx_deployment.c
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_io.c
src/simix/smx_io_private.h
src/simix/smx_network.c
src/simix/smx_network_private.h
src/simix/smx_private.h
src/simix/smx_process.c
src/simix/smx_process_private.h
src/simix/smx_smurf.c
src/simix/smx_smurf_private.h
src/simix/smx_synchro.c
src/simix/smx_synchro_private.h
src/simix/smx_user.c
src/smpi/smpi_base.c
src/smpi/smpi_bench.c
src/smpi/smpi_global.c
src/smpi/smpi_pmpi.c
src/xbt/xbt_sg_synchro.c
src/xbt/xbt_sg_time.c

index 85a00a0..2448f93 100644 (file)
@@ -237,27 +237,27 @@ static void action_barrier(const char *const *action)
     name = xbt_str_join_array(action, " ");
 
   if (mutex == NULL) {       // first arriving on the barrier
-    mutex = SIMIX_req_mutex_init();
-    cond = SIMIX_req_cond_init();
+    mutex = simcall_mutex_init();
+    cond = simcall_cond_init();
     processes_arrived_sofar=0;
   }
   XBT_DEBUG("Entering barrier: %s (%d already there)", name,processes_arrived_sofar);
 
-  SIMIX_req_mutex_lock(mutex);
+  simcall_mutex_lock(mutex);
   if (++processes_arrived_sofar == communicator_size) {
-    SIMIX_req_cond_broadcast(cond);
-    SIMIX_req_mutex_unlock(mutex);
+    simcall_cond_broadcast(cond);
+    simcall_mutex_unlock(mutex);
   } else {
-    SIMIX_req_cond_wait(cond,mutex);
-    SIMIX_req_mutex_unlock(mutex);
+    simcall_cond_wait(cond,mutex);
+    simcall_mutex_unlock(mutex);
   }
 
   XBT_DEBUG("Exiting barrier: %s", name);
 
   processes_arrived_sofar--;
   if (!processes_arrived_sofar) {
-    SIMIX_req_cond_destroy(cond);
-    SIMIX_req_mutex_destroy(mutex);
+    simcall_cond_destroy(cond);
+    simcall_mutex_destroy(mutex);
     mutex=NULL;
   }
 
index 5878388..3e5d219 100644 (file)
@@ -28,6 +28,7 @@ XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_pfn_smxprocess_t func
 
 /* Simulation execution */
 XBT_PUBLIC(void) SIMIX_run(void);    
+XBT_INLINE XBT_PUBLIC(double) SIMIX_get_clock(void);
 
 /* Timer functions FIXME: should these be public? */
 XBT_PUBLIC(void) SIMIX_timer_set(double date, void *function, void *arg);
@@ -81,49 +82,47 @@ XBT_PUBLIC(int) SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*,
 XBT_PUBLIC(void) SIMIX_comm_finish(smx_action_t action);
 
 /******************************************************************************/
-/*                        SIMIX Smurf Proxy Functions                         */
+/*                            SIMIX simcalls                                  */
 /******************************************************************************/
-/* These functions issue request through the Smurf proxy.                     */
-/* They cannot be called from maestro's context, and they are thread safe.    */
+/* These functions are a system call-like interface to the simulation kernel. */
+/* They can also be called from maestro's context, and they are thread safe.  */
 /******************************************************************************/
 
-XBT_INLINE XBT_PUBLIC(double) SIMIX_get_clock(void);
-
-/******************************* Host Requests ********************************/
-/* FIXME: use handlers and keep smx_host_t hidden from higher levels */
-XBT_PUBLIC(xbt_dict_t) SIMIX_req_host_get_dict(void);
-XBT_INLINE XBT_PUBLIC(smx_host_t) SIMIX_req_host_get_by_name(const char *name);
-XBT_PUBLIC(const char *) SIMIX_req_host_get_name(smx_host_t host);
-XBT_PUBLIC(xbt_dict_t) SIMIX_req_host_get_properties(smx_host_t host);
-XBT_PUBLIC(double) SIMIX_req_host_get_speed(smx_host_t host);
-XBT_PUBLIC(double) SIMIX_req_host_get_available_speed(smx_host_t host);
+/******************************* Host simcalls ********************************/
+/* TODO use handlers and keep smx_host_t hidden from higher levels */
+XBT_PUBLIC(xbt_dict_t) simcall_host_get_dict(void);
+XBT_INLINE XBT_PUBLIC(smx_host_t) simcall_host_get_by_name(const char *name);
+XBT_PUBLIC(const char *) simcall_host_get_name(smx_host_t host);
+XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(smx_host_t host);
+XBT_PUBLIC(double) simcall_host_get_speed(smx_host_t host);
+XBT_PUBLIC(double) simcall_host_get_available_speed(smx_host_t host);
 /* Two possible states, 1 - CPU ON and 0 CPU OFF */
-XBT_PUBLIC(int) SIMIX_req_host_get_state(smx_host_t host);
-XBT_PUBLIC(void *) SIMIX_req_host_get_data(smx_host_t host);
+XBT_PUBLIC(int) simcall_host_get_state(smx_host_t host);
+XBT_PUBLIC(void *) simcall_host_get_data(smx_host_t host);
 
-XBT_PUBLIC(void) SIMIX_req_host_set_data(smx_host_t host, void *data);
+XBT_PUBLIC(void) simcall_host_set_data(smx_host_t host, void *data);
 
-XBT_PUBLIC(smx_action_t) SIMIX_req_host_execute(const char *name, smx_host_t host,
+XBT_PUBLIC(smx_action_t) simcall_host_execute(const char *name, smx_host_t host,
                                                 double computation_amount,
                                                 double priority);
-XBT_PUBLIC(smx_action_t) SIMIX_req_host_parallel_execute(const char *name,
+XBT_PUBLIC(smx_action_t) simcall_host_parallel_execute(const char *name,
                                                      int host_nb,
                                                      smx_host_t *host_list,
                                                      double *computation_amount,
                                                      double *communication_amount,
                                                      double amount,
                                                      double rate);
-XBT_PUBLIC(void) SIMIX_req_host_execution_destroy(smx_action_t execution);
-XBT_PUBLIC(void) SIMIX_req_host_execution_cancel(smx_action_t execution);
-XBT_PUBLIC(double) SIMIX_req_host_execution_get_remains(smx_action_t execution);
-XBT_PUBLIC(e_smx_state_t) SIMIX_req_host_execution_get_state(smx_action_t execution);
-XBT_PUBLIC(void) SIMIX_req_host_execution_set_priority(smx_action_t execution, double priority);
-XBT_PUBLIC(e_smx_state_t) SIMIX_req_host_execution_wait(smx_action_t execution);
+XBT_PUBLIC(void) simcall_host_execution_destroy(smx_action_t execution);
+XBT_PUBLIC(void) simcall_host_execution_cancel(smx_action_t execution);
+XBT_PUBLIC(double) simcall_host_execution_get_remains(smx_action_t execution);
+XBT_PUBLIC(e_smx_state_t) simcall_host_execution_get_state(smx_action_t execution);
+XBT_PUBLIC(void) simcall_host_execution_set_priority(smx_action_t execution, double priority);
+XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_action_t execution);
 
 
-/**************************** Process Requests ********************************/
+/**************************** Process simcalls ********************************/
 /* Constructor and Destructor */
-XBT_PUBLIC(void) SIMIX_req_process_create(smx_process_t *process,
+XBT_PUBLIC(void) simcall_process_create(smx_process_t *process,
                                           const char *name,
                                           xbt_main_func_t code,
                                           void *data,
@@ -131,120 +130,118 @@ XBT_PUBLIC(void) SIMIX_req_process_create(smx_process_t *process,
                                           int argc, char **argv,
                                           xbt_dict_t properties);
 
-XBT_PUBLIC(void) SIMIX_req_process_kill(smx_process_t process);
-XBT_PUBLIC(void) SIMIX_req_process_killall(void);
+XBT_PUBLIC(void) simcall_process_kill(smx_process_t process);
+XBT_PUBLIC(void) simcall_process_killall(void);
 
 /* Process handling */
-XBT_PUBLIC(void) SIMIX_req_process_cleanup(smx_process_t process);
-XBT_PUBLIC(void) SIMIX_req_process_change_host(smx_process_t process,
+XBT_PUBLIC(void) simcall_process_cleanup(smx_process_t process);
+XBT_PUBLIC(void) simcall_process_change_host(smx_process_t process,
                                               smx_host_t dest);
-XBT_PUBLIC(void) SIMIX_req_process_suspend(smx_process_t process);
-XBT_PUBLIC(void) SIMIX_req_process_resume(smx_process_t process);
+XBT_PUBLIC(void) simcall_process_suspend(smx_process_t process);
+XBT_PUBLIC(void) simcall_process_resume(smx_process_t process);
 
 /* Getters and Setters */
-XBT_PUBLIC(int) SIMIX_req_process_count(void);
-XBT_PUBLIC(void *) SIMIX_req_process_get_data(smx_process_t process);
-XBT_PUBLIC(void) SIMIX_req_process_set_data(smx_process_t process, void *data);
-XBT_INLINE XBT_PUBLIC(smx_host_t) SIMIX_req_process_get_host(smx_process_t process);
-XBT_PUBLIC(const char *) SIMIX_req_process_get_name(smx_process_t process);
-XBT_PUBLIC(int) SIMIX_req_process_is_suspended(smx_process_t process);
-XBT_PUBLIC(xbt_dict_t) SIMIX_req_process_get_properties(smx_process_t host);
+XBT_PUBLIC(int) simcall_process_count(void);
+XBT_PUBLIC(void *) simcall_process_get_data(smx_process_t process);
+XBT_PUBLIC(void) simcall_process_set_data(smx_process_t process, void *data);
+XBT_INLINE XBT_PUBLIC(smx_host_t) simcall_process_get_host(smx_process_t process);
+XBT_PUBLIC(const char *) simcall_process_get_name(smx_process_t process);
+XBT_PUBLIC(int) simcall_process_is_suspended(smx_process_t process);
+XBT_PUBLIC(xbt_dict_t) simcall_process_get_properties(smx_process_t host);
 
 /* Sleep control */
-XBT_PUBLIC(e_smx_state_t) SIMIX_req_process_sleep(double duration);
+XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration);
 
-/************************** Comunication Requests *****************************/
+/************************** Comunication simcalls *****************************/
 /***** Rendez-vous points *****/
-XBT_PUBLIC(smx_rdv_t) SIMIX_req_rdv_create(const char *name);
-XBT_PUBLIC(void) SIMIX_req_rdv_destroy(smx_rdv_t rvp);
-XBT_PUBLIC(smx_rdv_t) SIMIX_req_rdv_get_by_name(const char *name);
-XBT_PUBLIC(int) SIMIX_req_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
-XBT_PUBLIC(smx_action_t) SIMIX_req_rdv_get_head(smx_rdv_t rdv);
+XBT_PUBLIC(smx_rdv_t) simcall_rdv_create(const char *name);
+XBT_PUBLIC(void) simcall_rdv_destroy(smx_rdv_t rvp);
+XBT_PUBLIC(smx_rdv_t) simcall_rdv_get_by_name(const char *name);
+XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
+XBT_PUBLIC(smx_action_t) simcall_rdv_get_head(smx_rdv_t rdv);
 
-/***** Communication Requests *****/
+/***** Communication simcalls *****/
 
-XBT_PUBLIC(void) SIMIX_req_comm_send(smx_rdv_t rdv, double task_size,
+XBT_PUBLIC(void) simcall_comm_send(smx_rdv_t rdv, double task_size,
                                      double rate, void *src_buff,
                                      size_t src_buff_size,
                                      int (*match_fun)(void *, void *),
                                      void *data, double timeout);
 
-XBT_PUBLIC(smx_action_t) SIMIX_req_comm_isend(smx_rdv_t rdv, double task_size,
+XBT_PUBLIC(smx_action_t) simcall_comm_isend(smx_rdv_t rdv, double task_size,
                                               double rate, void *src_buff,
                                               size_t src_buff_size,
                                               int (*match_fun)(void *, void *),
                                               void (*clean_fun)(void *),
                                               void *data, int detached);
 
-XBT_PUBLIC(void) SIMIX_req_comm_recv(smx_rdv_t rdv, void *dst_buff,
+XBT_PUBLIC(void) simcall_comm_recv(smx_rdv_t rdv, void *dst_buff,
                                      size_t * dst_buff_size,
                                      int (*match_fun)(void *, void *),
                                      void *data, double timeout);
 
-XBT_PUBLIC(smx_action_t) SIMIX_req_comm_irecv(smx_rdv_t rdv, void *dst_buff,
+XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
                                               size_t * dst_buff_size,
                                               int (*match_fun)(void *, void *),
                                               void *data);
 
-XBT_PUBLIC(void) SIMIX_req_comm_destroy(smx_action_t comm);
+XBT_PUBLIC(void) simcall_comm_destroy(smx_action_t comm);
 
-XBT_INLINE XBT_PUBLIC(void) SIMIX_req_comm_cancel(smx_action_t comm);
+XBT_INLINE XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
-XBT_PUBLIC(unsigned int) SIMIX_req_comm_waitany(xbt_dynar_t comms);
-XBT_PUBLIC(void) SIMIX_req_comm_wait(smx_action_t comm, double timeout);
-XBT_PUBLIC(int) SIMIX_req_comm_test(smx_action_t comm);
-XBT_PUBLIC(int) SIMIX_req_comm_testany(xbt_dynar_t comms);
+XBT_PUBLIC(unsigned int) simcall_comm_waitany(xbt_dynar_t comms);
+XBT_PUBLIC(void) simcall_comm_wait(smx_action_t comm, double timeout);
+XBT_PUBLIC(int) simcall_comm_test(smx_action_t comm);
+XBT_PUBLIC(int) simcall_comm_testany(xbt_dynar_t comms);
 
 /* Getters and setters */
-XBT_PUBLIC(double) SIMIX_req_comm_get_remains(smx_action_t comm);
-XBT_PUBLIC(e_smx_state_t) SIMIX_req_comm_get_state(smx_action_t comm);
-XBT_PUBLIC(void *) SIMIX_req_comm_get_src_data(smx_action_t comm);
-XBT_PUBLIC(void *) SIMIX_req_comm_get_dst_data(smx_action_t comm);
-XBT_PUBLIC(smx_process_t) SIMIX_req_comm_get_src_proc(smx_action_t comm);
-XBT_PUBLIC(smx_process_t) SIMIX_req_comm_get_dst_proc(smx_action_t comm);
+XBT_PUBLIC(double) simcall_comm_get_remains(smx_action_t comm);
+XBT_PUBLIC(e_smx_state_t) simcall_comm_get_state(smx_action_t comm);
+XBT_PUBLIC(void *) simcall_comm_get_src_data(smx_action_t comm);
+XBT_PUBLIC(void *) simcall_comm_get_dst_data(smx_action_t comm);
+XBT_PUBLIC(smx_process_t) simcall_comm_get_src_proc(smx_action_t comm);
+XBT_PUBLIC(smx_process_t) simcall_comm_get_dst_proc(smx_action_t comm);
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) SIMIX_req_comm_is_latency_bounded(smx_action_t comm);
+XBT_PUBLIC(int) simcall_comm_is_latency_bounded(smx_action_t comm);
 #endif
 
 #ifdef HAVE_TRACING
 /************************** Tracing handling **********************************/
-XBT_PUBLIC(void) SIMIX_req_set_category(smx_action_t action, const char *category);
+XBT_PUBLIC(void) simcall_set_category(smx_action_t action, const char *category);
 #endif
 
-/************************** Synchro handling **********************************/
+/************************** Synchro simcalls **********************************/
 
-XBT_PUBLIC(smx_mutex_t) SIMIX_req_mutex_init(void);
-XBT_PUBLIC(void) SIMIX_req_mutex_destroy(smx_mutex_t mutex);
-XBT_PUBLIC(void) SIMIX_req_mutex_lock(smx_mutex_t mutex);
-XBT_PUBLIC(int) SIMIX_req_mutex_trylock(smx_mutex_t mutex);
-XBT_PUBLIC(void) SIMIX_req_mutex_unlock(smx_mutex_t mutex);
+XBT_PUBLIC(smx_mutex_t) simcall_mutex_init(void);
+XBT_PUBLIC(void) simcall_mutex_destroy(smx_mutex_t mutex);
+XBT_PUBLIC(void) simcall_mutex_lock(smx_mutex_t mutex);
+XBT_PUBLIC(int) simcall_mutex_trylock(smx_mutex_t mutex);
+XBT_PUBLIC(void) simcall_mutex_unlock(smx_mutex_t mutex);
 
-XBT_PUBLIC(smx_cond_t) SIMIX_req_cond_init(void);
-XBT_PUBLIC(void) SIMIX_req_cond_destroy(smx_cond_t cond);
-XBT_PUBLIC(void) SIMIX_req_cond_signal(smx_cond_t cond);
-XBT_PUBLIC(void) SIMIX_req_cond_wait(smx_cond_t cond, smx_mutex_t mutex);
-XBT_PUBLIC(void) SIMIX_req_cond_wait_timeout(smx_cond_t cond,
+XBT_PUBLIC(smx_cond_t) simcall_cond_init(void);
+XBT_PUBLIC(void) simcall_cond_destroy(smx_cond_t cond);
+XBT_PUBLIC(void) simcall_cond_signal(smx_cond_t cond);
+XBT_PUBLIC(void) simcall_cond_wait(smx_cond_t cond, smx_mutex_t mutex);
+XBT_PUBLIC(void) simcall_cond_wait_timeout(smx_cond_t cond,
                                          smx_mutex_t mutex,
                                          double max_duration);
-XBT_PUBLIC(void) SIMIX_req_cond_broadcast(smx_cond_t cond);
-
-XBT_PUBLIC(smx_sem_t) SIMIX_req_sem_init(int capacity);
-XBT_PUBLIC(void) SIMIX_req_sem_destroy(smx_sem_t sem);
-XBT_PUBLIC(void) SIMIX_req_sem_release(smx_sem_t sem);
-XBT_PUBLIC(void) SIMIX_req_sem_release_forever(smx_sem_t sem);
-XBT_PUBLIC(int) SIMIX_req_sem_would_block(smx_sem_t sem);
-XBT_PUBLIC(void) SIMIX_req_sem_block_onto(smx_sem_t sem);
-XBT_PUBLIC(void) SIMIX_req_sem_acquire(smx_sem_t sem);
-XBT_PUBLIC(void) SIMIX_req_sem_acquire_timeout(smx_sem_t sem,
+XBT_PUBLIC(void) simcall_cond_broadcast(smx_cond_t cond);
+
+XBT_PUBLIC(smx_sem_t) simcall_sem_init(int capacity);
+XBT_PUBLIC(void) simcall_sem_destroy(smx_sem_t sem);
+XBT_PUBLIC(void) simcall_sem_release(smx_sem_t sem);
+XBT_PUBLIC(void) simcall_sem_release_forever(smx_sem_t sem);
+XBT_PUBLIC(int) simcall_sem_would_block(smx_sem_t sem);
+XBT_PUBLIC(void) simcall_sem_block_onto(smx_sem_t sem);
+XBT_PUBLIC(void) simcall_sem_acquire(smx_sem_t sem);
+XBT_PUBLIC(void) simcall_sem_acquire_timeout(smx_sem_t sem,
                                            double max_duration);
-XBT_PUBLIC(unsigned int) SIMIX_req_sem_acquire_any(xbt_dynar_t sems);
-XBT_PUBLIC(int) SIMIX_req_sem_get_capacity(smx_sem_t sem);
-
-XBT_PUBLIC(void) SIMIX_req_file_read(char* name);
+XBT_PUBLIC(unsigned int) simcall_sem_acquire_any(xbt_dynar_t sems);
+XBT_PUBLIC(int) simcall_sem_get_capacity(smx_sem_t sem);
 
-const char *SIMIX_request_name(int kind);
+XBT_PUBLIC(void) simcall_file_read(char* name);
 
 SG_END_DECL()
 #endif                          /* _SIMIX_SIMIX_H */
index 0af9f97..f05928a 100644 (file)
@@ -20,6 +20,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(gras_msg);
 
 typedef void *gras_trp_bufdata_;
 #include "simix/datatypes.h"
+#include "simix/smx_private.h"
 
 /* Yeah, the following is awfull, breaking the encapsulation of at least 3 modules
  * at the same time, but I'm tracking this bug since too long now, I want it dead. now.
@@ -160,7 +161,7 @@ gras_msg_t gras_msg_recv_any(void)
   }
   XBT_VERB("Wait on %ld 'sockets'", xbt_dynar_length(comms));
   /* Wait for the end of any of these communications */
-  got = SIMIX_req_comm_waitany(comms);
+  got = simcall_comm_waitany(comms);
 
   /* retrieve the message sent in that communication */
   sock = xbt_dynar_get_as(trp_proc->sockets, got, gras_socket_t);
@@ -177,7 +178,7 @@ gras_msg_t gras_msg_recv_any(void)
   }
   */
   sock_data->comm_recv =
-      SIMIX_req_comm_irecv(gras_socket_im_the_server(sock) ?
+      simcall_comm_irecv(gras_socket_im_the_server(sock) ?
                           sock_data->rdv_server : sock_data->rdv_client,
                           &sock_data->msg, NULL, NULL, NULL);
 
@@ -237,8 +238,8 @@ void gras_msg_send_ext(gras_socket_t sock,
                                                 payload, msg->payl);
   }
 
-  comm = SIMIX_req_comm_isend(target_rdv, whole_payload_size, -1, msg, sizeof(void *), NULL,NULL, msg, 0);
-  SIMIX_req_comm_wait(comm, -1);
+  comm = simcall_comm_isend(target_rdv, whole_payload_size, -1, msg, sizeof(void *), NULL,NULL, msg, 0);
+  simcall_comm_wait(comm, -1);
 
   XBT_VERB("Message sent (and received)");
 
index 276501a..b0fa264 100644 (file)
@@ -70,7 +70,7 @@ gras_socket_t gras_trp_select(double timeout)
 
     if ((sock_data->to_socket == active_socket) &&
         (sock_data->to_host ==
-         SIMIX_req_process_get_host(active_socket_data->from_process))) {
+         simcall_process_get_host(active_socket_data->from_process))) {
       xbt_dynar_cursor_unlock(pd->sockets);
       return sock_iter;
     }
@@ -107,21 +107,21 @@ gras_socket_t gras_trp_select(double timeout)
   sockdata->to_socket = active_socket;
   /*update the peer to_socket  variable */
   active_socket_data->to_socket = res;
-  sockdata->cond = SIMIX_req_cond_init();
-  sockdata->mutex = SIMIX_req_mutex_init();
+  sockdata->cond = simcall_cond_init();
+  sockdata->mutex = simcall_mutex_init();
 
   sockdata->to_host =
-      SIMIX_req_process_get_host(active_socket_data->from_process);
+      simcall_process_get_host(active_socket_data->from_process);
 
   res->data = sockdata;
-  res->peer_name = strdup(SIMIX_req_host_get_name(sockdata->to_host));
+  res->peer_name = strdup(simcall_host_get_name(sockdata->to_host));
 
   gras_trp_buf_init_sock(res);
 
   XBT_DEBUG("Create socket to process:%s(Port %d) from process: %s(Port %d)",
-         SIMIX_req_process_get_name(sockdata->from_process),
+         simcall_process_get_name(sockdata->from_process),
          res->peer_port,
-         SIMIX_req_process_get_name(sockdata->to_process), res->port);
+         simcall_process_get_name(sockdata->to_process), res->port);
 
   return res;
 }
index 0ec86e3..0eac7be 100644 (file)
@@ -91,9 +91,9 @@ static int gras_trp_sg_peer_port(gras_socket_t s) {
 static const char* gras_trp_sg_peer_name(gras_socket_t s) {
   gras_trp_sg_sock_data_t sockdata = s->data;
   if (gras_socket_im_the_server(s))
-    return SIMIX_host_get_name(SIMIX_req_process_get_host(sockdata->client));
+    return SIMIX_host_get_name(simcall_process_get_host(sockdata->client));
   else {
-    return SIMIX_host_get_name(SIMIX_req_process_get_host(sockdata->server));
+    return SIMIX_host_get_name(simcall_process_get_host(sockdata->server));
   }
 }
 static const char* gras_trp_sg_peer_proc(gras_socket_t s) {
@@ -139,11 +139,11 @@ void gras_trp_sg_socket_client(gras_trp_plugin_t self,
   gras_sg_portrec_t pr;
 
   /* make sure this socket will reach someone */
-  if (!(peer = SIMIX_req_host_get_by_name(host)))
+  if (!(peer = simcall_host_get_by_name(host)))
     THROWF(mismatch_error, 0,
            "Can't connect to %s: no such host.\n", host);
 
-  if (!(hd = (gras_hostdata_t *) SIMIX_req_host_get_data(peer)))
+  if (!(hd = (gras_hostdata_t *) simcall_host_get_data(peer)))
     THROWF(mismatch_error, 0,
            "can't connect to %s: no process on this host",
            host);
@@ -179,15 +179,15 @@ void gras_trp_sg_socket_client(gras_trp_plugin_t self,
 
   /* initialize synchronization stuff on the socket */
   data->rdv_server = pr->rdv;
-  data->rdv_client = SIMIX_req_rdv_create(NULL);
-  data->comm_recv = SIMIX_req_comm_irecv(data->rdv_client, &data->msg, NULL, NULL, NULL);
+  data->rdv_client = simcall_rdv_create(NULL);
+  data->comm_recv = simcall_comm_irecv(data->rdv_client, &data->msg, NULL, NULL, NULL);
 
   /* connect that simulation data to the socket */
   sock->data = data;
   sock->incoming = 1;
 
   XBT_DEBUG("%s (PID %d) connects in %s mode to %s:%d (rdv_ser:%p, rdv_cli:%p, comm:%p)",
-         SIMIX_req_process_get_name(SIMIX_process_self()), gras_os_getpid(),
+         simcall_process_get_name(SIMIX_process_self()), gras_os_getpid(),
          sock->meas ? "meas" : "regular", host, port,
          data->rdv_server,data->rdv_client,data->comm_recv);
 }
@@ -218,7 +218,7 @@ void gras_trp_sg_socket_server(gras_trp_plugin_t self, int port, gras_socket_t s
   pr->meas = sock->meas;
   pr->server = SIMIX_process_self();
   xbt_dynar_push(hd->ports, &pr);
-  pr->rdv = SIMIX_req_rdv_create(NULL);
+  pr->rdv = simcall_rdv_create(NULL);
 
   /* Create the socket */
   data = xbt_new0(s_gras_trp_sg_sock_data_t, 1);
@@ -227,13 +227,13 @@ void gras_trp_sg_socket_server(gras_trp_plugin_t self, int port, gras_socket_t s
   data->client = NULL;
   data->rdv_server = pr->rdv;
   data->rdv_client = NULL;
-  data->comm_recv = SIMIX_req_comm_irecv(pr->rdv, &data->msg, NULL, NULL, NULL);
+  data->comm_recv = simcall_comm_irecv(pr->rdv, &data->msg, NULL, NULL, NULL);
 
   sock->data = data;
 
   XBT_VERB
       ("'%s' (%d) ears on %s:%d%s (%p; data:%p); Here rdv: %p; Remote rdv: %p; Comm %p",
-       SIMIX_req_process_get_name(SIMIX_process_self()), gras_os_getpid(),
+       simcall_process_get_name(SIMIX_process_self()), gras_os_getpid(),
        SIMIX_host_self_get_name(), port,
        sock->meas ? " (mode meas)" : "", sock, data,
        (data->server ==
@@ -315,7 +315,7 @@ void gras_trp_sg_chunk_send_raw(gras_socket_t sock,
     smx_process_t remote_dude =
         (sock_data->server ==
          SIMIX_process_self())? (sock_data->client) : (sock_data->server);
-    smx_host_t remote_host = SIMIX_req_process_get_host(remote_dude);
+    smx_host_t remote_host = simcall_process_get_host(remote_dude);
   }
   */
   //SIMIX_network_send(sock_data->rdv,size,1,-1,NULL,0,NULL,NULL);
@@ -329,7 +329,7 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock,
   //gras_trp_sg_sock_data_t *sock_data =
   //    (gras_trp_sg_sock_data_t *) sock->data;
 
-  //SIMIX_req_comm_recv(sock_data->rdv,-1,NULL,0,NULL);
+  //simcall_comm_recv(sock_data->rdv,-1,NULL,0,NULL);
   THROW_UNIMPLEMENTED;
 #ifdef KILLME
   gras_trp_sg_sock_data_t *remote_sock_data;
@@ -355,17 +355,17 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock,
   sock_data = (gras_trp_sg_sock_data_t *) sock->data;
 
   /* ok, I'm here, you can continue the communication */
-  SIMIX_req_cond_signal(remote_sock_data->cond);
+  simcall_cond_signal(remote_sock_data->cond);
 
-  SIMIX_req_mutex_lock(remote_sock_data->mutex);
+  simcall_mutex_lock(remote_sock_data->mutex);
   /* wait for communication end */
-  SIMIX_req_cond_wait(remote_sock_data->cond, remote_sock_data->mutex);
+  simcall_cond_wait(remote_sock_data->cond, remote_sock_data->mutex);
 
   if (msg_got->payl_size != size)
     THROWF(mismatch_error, 0,
            "Got %d bytes when %ld where expected (in %s->%s:%d)",
            msg_got->payl_size, size,
-           SIMIX_req_host_get_name(sock_data->to_host),
+           simcall_host_get_name(sock_data->to_host),
            SIMIX_host_self_get_name(), sock->peer_port);
 
   if (data)
@@ -374,7 +374,7 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock,
   xbt_free(msg_got->payl);
 
   xbt_free(msg_got);
-  SIMIX_req_mutex_unlock(remote_sock_data->mutex);
+  simcall_mutex_unlock(remote_sock_data->mutex);
 #endif
   return 0;
 }
index 7d55dee..1fce177 100644 (file)
@@ -23,8 +23,8 @@ void gras_cpu_burn(double flops)
   smx_action_t execution;
 
   if (flops > 0){
-    execution = SIMIX_req_host_execute("task", SIMIX_host_self(), flops, 1);
-    SIMIX_req_host_execution_wait(execution);
+    execution = simcall_host_execute("task", SIMIX_host_self(), flops, 1);
+    simcall_host_execution_wait(execution);
   }
 }
 
index 3d70daa..781ab57 100644 (file)
@@ -28,7 +28,7 @@ void gras_agent_spawn(const char *name,
 {
 
   smx_process_t process;
-  SIMIX_req_process_create(&process, name, code, NULL,
+  simcall_process_create(&process, name, code, NULL,
                            gras_os_myname(), argc, argv, properties);
 }
 
@@ -84,7 +84,7 @@ void gras_process_exit()
   gras_hostdata_t *hd =
       (gras_hostdata_t *) SIMIX_host_self_get_data();
   gras_procdata_t *pd =
-      (gras_procdata_t *) SIMIX_req_process_get_data(SIMIX_process_self());
+      (gras_procdata_t *) simcall_process_get_data(SIMIX_process_self());
 
   gras_msg_procdata_t msg_pd =
       (gras_msg_procdata_t) gras_libdata_by_name("gras_msg");
@@ -99,7 +99,7 @@ void gras_process_exit()
   xbt_assert(hd, "Run gras_process_init (ie, gras_init)!!");
 
   XBT_VERB("GRAS: Finalizing process '%s' (%d)",
-        SIMIX_req_process_get_name(SIMIX_process_self()), gras_os_getpid());
+        simcall_process_get_name(SIMIX_process_self()), gras_os_getpid());
 
   if (!xbt_dynar_is_empty(msg_pd->msg_queue)) {
     unsigned int cpt;
@@ -138,7 +138,7 @@ void gras_process_exit()
 gras_procdata_t *gras_procdata_get(void)
 {
   gras_procdata_t *pd =
-      (gras_procdata_t *) SIMIX_req_process_get_data(SIMIX_process_self());
+      (gras_procdata_t *) simcall_process_get_data(SIMIX_process_self());
 
   xbt_assert(pd, "Run gras_process_init! (ie, gras_init)");
 
@@ -147,12 +147,12 @@ gras_procdata_t *gras_procdata_get(void)
 
 void *gras_libdata_by_name_from_remote(const char *name, smx_process_t p)
 {
-  gras_procdata_t *pd = (gras_procdata_t *) SIMIX_req_process_get_data(p);
+  gras_procdata_t *pd = (gras_procdata_t *) simcall_process_get_data(p);
 
   xbt_assert(pd,
               "process '%s' on '%s' didn't run gras_process_init! (ie, gras_init)",
-              SIMIX_req_process_get_name(p),
-              SIMIX_req_host_get_name(SIMIX_req_process_get_host(p)));
+              simcall_process_get_name(p),
+              simcall_host_get_name(simcall_process_get_host(p)));
 
   return gras_libdata_by_name_from_procdata(name, pd);
 }
@@ -160,7 +160,7 @@ void *gras_libdata_by_name_from_remote(const char *name, smx_process_t p)
 /** @brief retrieve the value of a given process property (or NULL if not defined) */
 const char *gras_process_property_value(const char *name)
 {
-  return xbt_dict_get_or_null(SIMIX_req_process_get_properties
+  return xbt_dict_get_or_null(simcall_process_get_properties
                              (SIMIX_process_self()), name);
 }
 
@@ -169,7 +169,7 @@ const char *gras_process_property_value(const char *name)
  */
 xbt_dict_t gras_process_properties(void)
 {
-  return SIMIX_req_process_get_properties(SIMIX_process_self());
+  return simcall_process_get_properties(SIMIX_process_self());
 }
 
 /* **************************************************************************
@@ -191,8 +191,8 @@ int gras_os_getpid(void)
 const char *gras_os_host_property_value(const char *name)
 {
   return
-      xbt_dict_get_or_null(SIMIX_req_host_get_properties
-                           (SIMIX_req_process_get_host(SIMIX_process_self())),
+      xbt_dict_get_or_null(simcall_host_get_properties
+                           (simcall_process_get_host(SIMIX_process_self())),
                            name);
 }
 
@@ -202,7 +202,7 @@ const char *gras_os_host_property_value(const char *name)
 xbt_dict_t gras_os_host_properties(void)
 {
   return
-      SIMIX_req_host_get_properties(SIMIX_req_process_get_host
+      simcall_host_get_properties(simcall_process_get_host
                                 (SIMIX_process_self()));
 }
 
index 740bd2d..ce67b09 100644 (file)
@@ -21,7 +21,7 @@
 #include "instr/instr.h"
 #include "msg/msg.h"
 #include "simdag/private.h"
-#include "simix/private.h"
+#include "simix/smx_private.h"
 #include "xbt/graph_private.h"
 
 typedef enum {
index 3d5b514..bae5fb1 100644 (file)
@@ -53,7 +53,7 @@ void MC_dpor(void)
 {
   char *req_str;
   int value;
-  smx_req_t req = NULL, prev_req = NULL;
+  smx_simcall_t req = NULL, prev_req = NULL;
   mc_state_t state = NULL, prev_state = NULL, next_state = NULL;
   smx_process_t process = NULL;
   xbt_fifo_item_t item = NULL;
@@ -88,7 +88,7 @@ void MC_dpor(void)
       mc_stats->executed_transitions++;
 
       /* Answer the request */
-      SIMIX_request_pre(req, value); /* After this call req is no longer usefull */
+      SIMIX_simcall_pre(req, value); /* After this call req is no longer usefull */
 
       /* Wait for requests (schedules processes) */
       MC_wait_for_requests();
@@ -232,7 +232,7 @@ void MC_dpor_stateful(){
 
   int value;
   mc_state_t next_graph_state = NULL;
-  smx_req_t req = NULL, prev_req = NULL;
+  smx_simcall_t req = NULL, prev_req = NULL;
   char *req_str;
   xbt_fifo_item_t item = NULL;
 
@@ -268,7 +268,7 @@ void MC_dpor_stateful(){
       mc_stats->executed_transitions++;
       
       /* Answer the request */
-      SIMIX_request_pre(req, value);
+      SIMIX_simcall_pre(req, value);
       
       /* Wait for requests (schedules processes) */
       MC_wait_for_requests();
index d124b0e..68f11cd 100644 (file)
@@ -178,15 +178,15 @@ int MC_random(int min, int max)
 void MC_wait_for_requests(void)
 {
   smx_process_t process;
-  smx_req_t req;
+  smx_simcall_t req;
   unsigned int iter;
 
   while (!xbt_dynar_is_empty(simix_global->process_to_run)) {
     SIMIX_process_runall();
     xbt_dynar_foreach(simix_global->process_that_ran, iter, process) {
-      req = &process->request;
+      req = &process->simcall;
       if (req->call != REQ_NO_REQ && !MC_request_is_visible(req))
-          SIMIX_request_pre(req, 0);
+          SIMIX_simcall_pre(req, 0);
     }
   }
 }
@@ -198,8 +198,8 @@ int MC_deadlock_check()
   if(xbt_swag_size(simix_global->process_list)){
     deadlock = TRUE;
     xbt_swag_foreach(process, simix_global->process_list){
-      if(process->request.call != REQ_NO_REQ
-         && MC_request_is_enabled(&process->request)){
+      if(process->simcall.call != REQ_NO_REQ
+         && MC_request_is_enabled(&process->simcall)){
         deadlock = FALSE;
         break;
       }
@@ -217,7 +217,7 @@ void MC_replay(xbt_fifo_t stack)
 {
   int value;
   char *req_str;
-  smx_req_t req = NULL, saved_req = NULL;
+  smx_simcall_t req = NULL, saved_req = NULL;
   xbt_fifo_item_t item;
   mc_state_t state;
 
@@ -240,7 +240,7 @@ void MC_replay(xbt_fifo_t stack)
     if(saved_req){
       /* because we got a copy of the executed request, we have to fetch the  
          real one, pointed by the request field of the issuer process */
-      req = &saved_req->issuer->request;
+      req = &saved_req->issuer->simcall;
 
       /* Debug information */
       if(XBT_LOG_ISENABLED(mc_global, xbt_log_priority_debug)){
@@ -250,7 +250,7 @@ void MC_replay(xbt_fifo_t stack)
       }
     }
          
-    SIMIX_request_pre(req, value);
+    SIMIX_simcall_pre(req, value);
     MC_wait_for_requests();
          
     /* Update statistics */
@@ -264,7 +264,7 @@ void MC_replay_liveness(xbt_fifo_t stack, int all_stack)
 {
   int value;
   char *req_str;
-  smx_req_t req = NULL, saved_req = NULL;
+  smx_simcall_t req = NULL, saved_req = NULL;
   xbt_fifo_item_t item;
   mc_state_t state;
   mc_pair_stateless_t pair;
@@ -295,7 +295,7 @@ void MC_replay_liveness(xbt_fifo_t stack, int all_stack)
        if(saved_req != NULL){
          /* because we got a copy of the executed request, we have to fetch the  
             real one, pointed by the request field of the issuer process */
-         req = &saved_req->issuer->request;
+         req = &saved_req->issuer->simcall;
          //XBT_DEBUG("Req->call %u", req->call);
        
          /* Debug information */
@@ -307,7 +307,7 @@ void MC_replay_liveness(xbt_fifo_t stack, int all_stack)
        
        }
  
-       SIMIX_request_pre(req, value);
+       SIMIX_simcall_pre(req, value);
        MC_wait_for_requests();
       }
 
@@ -337,7 +337,7 @@ void MC_replay_liveness(xbt_fifo_t stack, int all_stack)
        if(saved_req != NULL){
          /* because we got a copy of the executed request, we have to fetch the  
             real one, pointed by the request field of the issuer process */
-         req = &saved_req->issuer->request;
+         req = &saved_req->issuer->simcall;
          //XBT_DEBUG("Req->call %u", req->call);
        
          /* Debug information */
@@ -349,7 +349,7 @@ void MC_replay_liveness(xbt_fifo_t stack, int all_stack)
        
        }
  
-       SIMIX_request_pre(req, value);
+       SIMIX_simcall_pre(req, value);
        MC_wait_for_requests();
       }
 
@@ -387,7 +387,7 @@ void MC_show_stack_safety_stateless(xbt_fifo_t stack)
   int value;
   mc_state_t state;
   xbt_fifo_item_t item;
-  smx_req_t req;
+  smx_simcall_t req;
   char *req_str = NULL;
   
   for (item = xbt_fifo_get_last_item(stack);
@@ -402,7 +402,7 @@ void MC_show_stack_safety_stateless(xbt_fifo_t stack)
   }
 }
 
-void MC_show_deadlock(smx_req_t req)
+void MC_show_deadlock(smx_simcall_t req)
 {
   /*char *req_str = NULL;*/
   XBT_INFO("**************************");
@@ -416,7 +416,7 @@ void MC_show_deadlock(smx_req_t req)
   MC_dump_stack_safety_stateless(mc_stack_safety_stateless);
 }
 
-void MC_show_deadlock_stateful(smx_req_t req)
+void MC_show_deadlock_stateful(smx_simcall_t req)
 {
   /*char *req_str = NULL;*/
   XBT_INFO("**************************");
@@ -448,7 +448,7 @@ void MC_show_stack_safety_stateful(xbt_fifo_t stack)
   int value;
   mc_state_ws_t state;
   xbt_fifo_item_t item;
-  smx_req_t req;
+  smx_simcall_t req;
   char *req_str = NULL;
   
   for (item = xbt_fifo_get_last_item(stack);
@@ -468,7 +468,7 @@ void MC_show_stack_liveness(xbt_fifo_t stack){
   int value;
   mc_pair_stateless_t pair;
   xbt_fifo_item_t item;
-  smx_req_t req;
+  smx_simcall_t req;
   char *req_str = NULL;
   
   for (item = xbt_fifo_get_last_item(stack);
index b562fa2..19a312f 100644 (file)
@@ -770,7 +770,7 @@ void MC_ddfs(int search_cycle){
 
   int value;
   mc_state_t next_graph_state = NULL;
-  smx_req_t req = NULL;
+  smx_simcall_t req = NULL;
   char *req_str;
 
   xbt_transition_t transition_succ;
@@ -802,7 +802,7 @@ void MC_ddfs(int search_cycle){
        MC_state_set_executed_request(current_pair->graph_state, req, value);   
     
        /* Answer the request */
-       SIMIX_request_pre(req, value);
+       SIMIX_simcall_pre(req, value);
 
        /* Wait for requests (schedules processes) */
        MC_wait_for_requests();
index a05c587..83fd805 100644 (file)
@@ -6,7 +6,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc,
 static char* pointer_to_string(void* pointer);
 static char* buff_size_to_string(size_t size);
 
-int MC_request_depend(smx_req_t r1, smx_req_t r2)
+int MC_request_depend(smx_simcall_t r1, smx_simcall_t r2)
 {
   if(_surf_do_model_check == 2)
     return TRUE;
@@ -167,7 +167,7 @@ static char* buff_size_to_string(size_t buff_size) {
 }
 
 
-char *MC_request_to_string(smx_req_t req, int value)
+char *MC_request_to_string(smx_simcall_t req, int value)
 {
   char *type = NULL, *args = NULL, *str = NULL, *p = NULL, *bs = NULL;
   smx_action_t act = NULL;
@@ -247,7 +247,7 @@ char *MC_request_to_string(smx_req_t req, int value)
   return str;
 }
 
-unsigned int MC_request_testany_fail(smx_req_t req)
+unsigned int MC_request_testany_fail(smx_simcall_t req)
 {
   unsigned int cursor;
   smx_action_t action;
@@ -260,7 +260,7 @@ unsigned int MC_request_testany_fail(smx_req_t req)
   return TRUE;
 }
 
-int MC_request_is_visible(smx_req_t req)
+int MC_request_is_visible(smx_simcall_t req)
 {
   return req->call == REQ_COMM_ISEND
      || req->call == REQ_COMM_IRECV
@@ -270,7 +270,7 @@ int MC_request_is_visible(smx_req_t req)
      || req->call == REQ_COMM_TESTANY;
 }
 
-int MC_request_is_enabled(smx_req_t req)
+int MC_request_is_enabled(smx_simcall_t req)
 {
   unsigned int index = 0;
   smx_action_t act;
@@ -307,7 +307,7 @@ int MC_request_is_enabled(smx_req_t req)
   }
 }
 
-int MC_request_is_enabled_by_idx(smx_req_t req, unsigned int idx)
+int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
 {
   smx_action_t act;
 
@@ -336,7 +336,7 @@ int MC_request_is_enabled_by_idx(smx_req_t req, unsigned int idx)
 
 int MC_process_is_enabled(smx_process_t process)
 {
-  if (process->request.call != REQ_NO_REQ && MC_request_is_enabled(&process->request))
+  if (process->simcall.call != REQ_NO_REQ && MC_request_is_enabled(&process->simcall))
     return TRUE;
 
   return FALSE;
index 08d7b59..d8604de 100644 (file)
@@ -63,7 +63,7 @@ int MC_state_process_is_done(mc_state_t state, smx_process_t process){
   return state->proc_status[process->pid].state == MC_DONE ? TRUE : FALSE;
 }
 
-void MC_state_set_executed_request(mc_state_t state, smx_req_t req, int value)
+void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int value)
 {
   state->executed_req = *req;
   state->req_num = value;
@@ -111,18 +111,18 @@ void MC_state_set_executed_request(mc_state_t state, smx_req_t req, int value)
   }
 }
 
-smx_req_t MC_state_get_executed_request(mc_state_t state, int *value)
+smx_simcall_t MC_state_get_executed_request(mc_state_t state, int *value)
 {
   *value = state->req_num;
   return &state->executed_req;
 }
 
-smx_req_t MC_state_get_internal_request(mc_state_t state)
+smx_simcall_t MC_state_get_internal_request(mc_state_t state)
 {
   return &state->internal_req;
 }
 
-smx_req_t MC_state_get_request(mc_state_t state, int *value)
+smx_simcall_t MC_state_get_request(mc_state_t state, int *value)
 {
   smx_process_t process = NULL;
   mc_procstate_t procstate = NULL;
@@ -133,58 +133,58 @@ smx_req_t MC_state_get_request(mc_state_t state, int *value)
 
     if(procstate->state == MC_INTERLEAVE){
       if(MC_process_is_enabled(process)){
-        switch(process->request.call){
+        switch(process->simcall.call){
           case REQ_COMM_WAITANY:
             *value = -1;
-            while(procstate->interleave_count < xbt_dynar_length(process->request.comm_waitany.comms)){
-              if(MC_request_is_enabled_by_idx(&process->request, procstate->interleave_count++)){
+            while(procstate->interleave_count < xbt_dynar_length(process->simcall.comm_waitany.comms)){
+              if(MC_request_is_enabled_by_idx(&process->simcall, procstate->interleave_count++)){
                 *value = procstate->interleave_count-1;
                 break;
               }
             }
 
-            if(procstate->interleave_count >= xbt_dynar_length(process->request.comm_waitany.comms))
+            if(procstate->interleave_count >= xbt_dynar_length(process->simcall.comm_waitany.comms))
               procstate->state = MC_DONE;
 
             if(*value != -1)
-              return &process->request;
+              return &process->simcall;
 
             break;
 
           case REQ_COMM_TESTANY:
             start_count = procstate->interleave_count;
             *value = -1;
-            while(procstate->interleave_count < xbt_dynar_length(process->request.comm_testany.comms)){
-              if(MC_request_is_enabled_by_idx(&process->request, procstate->interleave_count++)){
+            while(procstate->interleave_count < xbt_dynar_length(process->simcall.comm_testany.comms)){
+              if(MC_request_is_enabled_by_idx(&process->simcall, procstate->interleave_count++)){
                 *value = procstate->interleave_count - 1;
                 break;
               }
             }
 
-            if(procstate->interleave_count >= xbt_dynar_length(process->request.comm_testany.comms))
+            if(procstate->interleave_count >= xbt_dynar_length(process->simcall.comm_testany.comms))
               procstate->state = MC_DONE;
 
             if(*value != -1 || start_count == 0)
-              return &process->request;
+              return &process->simcall;
 
             break;
 
           case REQ_COMM_WAIT:
-            if(process->request.comm_wait.comm->comm.src_proc
-               && process->request.comm_wait.comm->comm.dst_proc){
+            if(process->simcall.comm_wait.comm->comm.src_proc
+               && process->simcall.comm_wait.comm->comm.dst_proc){
               *value = 0;
             }else{
               *value = -1;
             }
             procstate->state = MC_DONE;
-            return &process->request;
+            return &process->simcall;
 
             break;
 
           default:
             procstate->state = MC_DONE;
             *value = 0;
-            return &process->request;
+            return &process->simcall;
             break;
         }
       }
index 389c087..d35bbdd 100644 (file)
@@ -53,21 +53,21 @@ void MC_replay(xbt_fifo_t stack);
 void MC_replay_liveness(xbt_fifo_t stack, int all_stack);
 void MC_wait_for_requests(void);
 void MC_get_enabled_processes();
-void MC_show_deadlock(smx_req_t req);
-void MC_show_deadlock_stateful(smx_req_t req);
+void MC_show_deadlock(smx_simcall_t req);
+void MC_show_deadlock_stateful(smx_simcall_t req);
 void MC_show_stack_safety_stateless(xbt_fifo_t stack);
 void MC_dump_stack_safety_stateless(xbt_fifo_t stack);
 void MC_show_stack_safety_stateful(xbt_fifo_t stack);
 void MC_dump_stack_safety_stateful(xbt_fifo_t stack);
 
 /********************************* Requests ***********************************/
-int MC_request_depend(smx_req_t req1, smx_req_t req2);
-char* MC_request_to_string(smx_req_t req, int value);
-unsigned int MC_request_testany_fail(smx_req_t req);
+int MC_request_depend(smx_simcall_t req1, smx_simcall_t req2);
+char* MC_request_to_string(smx_simcall_t req, int value);
+unsigned int MC_request_testany_fail(smx_simcall_t req);
 /*int MC_waitany_is_enabled_by_comm(smx_req_t req, unsigned int comm);*/
-int MC_request_is_visible(smx_req_t req);
-int MC_request_is_enabled(smx_req_t req);
-int MC_request_is_enabled_by_idx(smx_req_t req, unsigned int idx);
+int MC_request_is_visible(smx_simcall_t req);
+int MC_request_is_enabled(smx_simcall_t req);
+int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx);
 int MC_process_is_enabled(smx_process_t process);
 
 
@@ -91,8 +91,8 @@ typedef struct mc_state {
   unsigned long max_pid;            /* Maximum pid at state's creation time */
   mc_procstate_t proc_status;       /* State's exploration status by process */
   s_smx_action_t internal_comm;     /* To be referenced by the internal_req */
-  s_smx_req_t internal_req;         /* Internal translation of request */
-  s_smx_req_t executed_req;         /* The executed request of the state */
+  s_smx_simcall_t internal_req;         /* Internal translation of request */
+  s_smx_simcall_t executed_req;         /* The executed request of the state */
   int req_num;                      /* The request number (in the case of a
                                        multi-request like waitany ) */
 } s_mc_state_t, *mc_state_t;
@@ -104,10 +104,10 @@ void MC_state_delete(mc_state_t state);
 void MC_state_interleave_process(mc_state_t state, smx_process_t process);
 unsigned int MC_state_interleave_size(mc_state_t state);
 int MC_state_process_is_done(mc_state_t state, smx_process_t process);
-void MC_state_set_executed_request(mc_state_t state, smx_req_t req, int value);
-smx_req_t MC_state_get_executed_request(mc_state_t state, int *value);
-smx_req_t MC_state_get_internal_request(mc_state_t state);
-smx_req_t MC_state_get_request(mc_state_t state, int *value);
+void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int value);
+smx_simcall_t MC_state_get_executed_request(mc_state_t state, int *value);
+smx_simcall_t MC_state_get_internal_request(mc_state_t state);
+smx_simcall_t MC_state_get_request(mc_state_t state, int *value);
 
 /****************************** Statistics ************************************/
 typedef struct mc_stats {
index 93f479f..6b1da36 100644 (file)
 m_host_t MSG_get_host_by_name(const char *name)
 {
   smx_host_t simix_h = NULL;
-  simix_h = SIMIX_req_host_get_by_name(name);
+  simix_h = simcall_host_get_by_name(name);
 
   if (simix_h == NULL)
     return NULL;
 
-  return (m_host_t) SIMIX_req_host_get_data(simix_h);
+  return (m_host_t) simcall_host_get_data(simix_h);
 }
 
 /** \ingroup msg_easier_life
index 2a91cb0..7b0c29e 100644 (file)
@@ -197,7 +197,7 @@ MSG_error_t MSG_main_liveness(xbt_automaton_t a, char *prgm)
  */
 int MSG_process_killall(int reset_PIDs)
 {
-  SIMIX_req_process_killall();
+  simcall_process_killall();
 
   if (reset_PIDs > 0) {
     msg_global->PID = reset_PIDs;
index 90b8c69..c97b980 100644 (file)
@@ -55,15 +55,15 @@ MSG_error_t MSG_task_execute(m_task_t task)
   p_simdata = SIMIX_process_self_get_data(self);
   simdata->isused=1;
   simdata->compute =
-      SIMIX_req_host_execute(task->name, p_simdata->m_host->simdata->smx_host,
+      simcall_host_execute(task->name, p_simdata->m_host->simdata->smx_host,
                            simdata->computation_amount,
                            simdata->priority);
 #ifdef HAVE_TRACING
-  SIMIX_req_set_category(simdata->compute, task->category);
+  simcall_set_category(simdata->compute, task->category);
 #endif
 
   p_simdata->waiting_action = simdata->compute;
-  comp_state = SIMIX_req_host_execution_wait(simdata->compute);
+  comp_state = simcall_host_execution_wait(simdata->compute);
   p_simdata->waiting_action = NULL;
 
   simdata->isused=0;
@@ -78,7 +78,7 @@ MSG_error_t MSG_task_execute(m_task_t task)
     TRACE_msg_task_execute_end(task);
 #endif
     MSG_RETURN(MSG_OK);
-  } else if (SIMIX_req_host_get_state(SIMIX_host_self()) == 0) {
+  } else if (simcall_host_get_state(SIMIX_host_self()) == 0) {
     /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
     simdata->comm = NULL;
     simdata->compute = NULL;
@@ -175,14 +175,14 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task)
   simdata->isused=1;
 
   simdata->compute =
-      SIMIX_req_host_parallel_execute(task->name, simdata->host_nb,
+      simcall_host_parallel_execute(task->name, simdata->host_nb,
                                   simdata->host_list,
                                   simdata->comp_amount,
                                   simdata->comm_amount, 1.0, -1.0);
   XBT_DEBUG("Parallel execution action created: %p", simdata->compute);
 
   p_simdata->waiting_action = simdata->compute;
-  comp_state = SIMIX_req_host_execution_wait(simdata->compute);
+  comp_state = simcall_host_execution_wait(simdata->compute);
   p_simdata->waiting_action = NULL;
 
   XBT_DEBUG("Finished waiting for execution of action %p, state = %d", simdata->compute, comp_state);
@@ -195,7 +195,7 @@ MSG_error_t MSG_parallel_task_execute(m_task_t task)
     simdata->comm = NULL;
     simdata->compute = NULL;
     MSG_RETURN(MSG_OK);
-  } else if (SIMIX_req_host_get_state(SIMIX_host_self()) == 0) {
+  } else if (simcall_host_get_state(SIMIX_host_self()) == 0) {
     /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
     simdata->comm = NULL;
     simdata->compute = NULL;
@@ -226,7 +226,7 @@ MSG_error_t MSG_process_sleep(double nb_sec)
 #endif
 
   /* create action to sleep */
-  state = SIMIX_req_process_sleep(nb_sec);
+  state = simcall_process_sleep(nb_sec);
 
   /*proc->simdata->waiting_action = act_sleep;
 
@@ -418,7 +418,7 @@ XBT_INLINE msg_comm_t MSG_task_isend_with_matching(m_task_t task, const char *al
   comm->task_received = NULL;
   comm->status = MSG_OK;
   comm->s_comm =
-    SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+    simcall_comm_isend(mailbox, t_simdata->message_size,
                          t_simdata->rate, task, sizeof(void *), match_fun, NULL, match_data, 0);
   t_simdata->comm = comm->s_comm; /* FIXME: is the field t_simdata->comm still useful? */
 
@@ -464,7 +464,7 @@ void MSG_task_dsend(m_task_t task, const char *alias, void_f_pvoid_t cleanup)
   msg_global->sent_msg++;
 
   /* Send it by calling SIMIX network layer */
-  smx_action_t comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+  smx_action_t comm = simcall_comm_isend(mailbox, t_simdata->message_size,
                        t_simdata->rate, task, sizeof(void *), NULL, cleanup, NULL, 1);
   t_simdata->comm = comm;
 }
@@ -499,7 +499,7 @@ msg_comm_t MSG_task_irecv(m_task_t *task, const char *name)
   comm->task_sent = NULL;
   comm->task_received = task;
   comm->status = MSG_OK;
-  comm->s_comm = SIMIX_req_comm_irecv(rdv, task, NULL, NULL, NULL);
+  comm->s_comm = simcall_comm_irecv(rdv, task, NULL, NULL, NULL);
 
   return comm;
 }
@@ -517,7 +517,7 @@ int MSG_comm_test(msg_comm_t comm)
   xbt_ex_t e;
   int finished = 0;
   TRY {
-    finished = SIMIX_req_comm_test(comm->s_comm);
+    finished = simcall_comm_test(comm->s_comm);
 
     if (finished && comm->task_received != NULL) {
       /* I am the receiver */
@@ -573,7 +573,7 @@ int MSG_comm_testany(xbt_dynar_t comms)
 
   MSG_error_t status = MSG_OK;
   TRY {
-    finished_index = SIMIX_req_comm_testany(s_comms);
+    finished_index = simcall_comm_testany(s_comms);
   }
   CATCH(e) {
     switch (e.category) {
@@ -635,7 +635,7 @@ MSG_error_t MSG_comm_wait(msg_comm_t comm, double timeout)
 {
   xbt_ex_t e;
   TRY {
-    SIMIX_req_comm_wait(comm->s_comm, timeout);
+    simcall_comm_wait(comm->s_comm, timeout);
 
     if (comm->task_received != NULL) {
       /* I am the receiver */
@@ -700,7 +700,7 @@ int MSG_comm_waitany(xbt_dynar_t comms)
 
   MSG_error_t status = MSG_OK;
   TRY {
-    finished_index = SIMIX_req_comm_waitany(s_comms);
+    finished_index = simcall_comm_waitany(s_comms);
   }
   CATCH(e) {
     switch (e.category) {
@@ -775,7 +775,7 @@ void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_si
   if (msg_global->task_copy_callback) {
     m_task_t task = buff;
     msg_global->task_copy_callback(task,
-        SIMIX_req_comm_get_src_proc(comm), SIMIX_req_comm_get_dst_proc(comm));
+        simcall_comm_get_src_proc(comm), simcall_comm_get_dst_proc(comm));
   }
 }
 
index 5ca1eba..1723408 100644 (file)
@@ -54,7 +54,7 @@ m_host_t __MSG_host_create(smx_host_t workstation, void *data)
     memset(alias, 0, MAX_ALIAS_NAME + 1);
   }
 
-  SIMIX_req_host_set_data(workstation, host);
+  simcall_host_set_data(workstation, host);
   xbt_lib_set(host_lib,name,MSG_HOST_LEVEL,host);
 
   return host;
@@ -195,7 +195,7 @@ double MSG_get_host_speed(m_host_t h)
 {
   xbt_assert((h != NULL), "Invalid parameters");
 
-  return (SIMIX_req_host_get_speed(h->simdata->smx_host));
+  return (simcall_host_get_speed(h->simdata->smx_host));
 }
 
 /** \ingroup m_host_management
@@ -220,7 +220,7 @@ xbt_dict_t MSG_host_get_properties(m_host_t host)
 {
   xbt_assert((host != NULL), "Invalid parameters (host is NULL)");
 
-  return (SIMIX_req_host_get_properties(host->simdata->smx_host));
+  return (simcall_host_get_properties(host->simdata->smx_host));
 }
 
 
@@ -232,5 +232,5 @@ xbt_dict_t MSG_host_get_properties(m_host_t host)
 int MSG_host_is_avail(m_host_t h)
 {
   xbt_assert((h != NULL), "Invalid parameters (host is NULL)");
-  return (SIMIX_req_host_get_state(h->simdata->smx_host));
+  return (simcall_host_get_state(h->simdata->smx_host));
 }
index 8d575a6..4eb5053 100644 (file)
@@ -13,41 +13,41 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_mailbox, msg,
 
 msg_mailbox_t MSG_mailbox_new(const char *alias)
 {
-  return SIMIX_req_rdv_create(alias);
+  return simcall_rdv_create(alias);
 }
 
 void MSG_mailbox_free(void *mailbox)
 {
-  SIMIX_req_rdv_destroy((msg_mailbox_t)mailbox);
+  simcall_rdv_destroy((msg_mailbox_t)mailbox);
 }
 
 int MSG_mailbox_is_empty(msg_mailbox_t mailbox)
 {
-  return (NULL == SIMIX_req_rdv_get_head(mailbox));
+  return (NULL == simcall_rdv_get_head(mailbox));
 }
 
 m_task_t MSG_mailbox_get_head(msg_mailbox_t mailbox)
 {
-  smx_action_t comm = SIMIX_req_rdv_get_head(mailbox);
+  smx_action_t comm = simcall_rdv_get_head(mailbox);
 
   if (!comm)
     return NULL;
 
-  return (m_task_t) SIMIX_req_comm_get_src_data(comm);
+  return (m_task_t) simcall_comm_get_src_data(comm);
 }
 
 int
 MSG_mailbox_get_count_host_waiting_tasks(msg_mailbox_t mailbox,
                                          m_host_t host)
 {
-  return SIMIX_req_rdv_comm_count_by_host(mailbox,
+  return simcall_rdv_comm_count_by_host(mailbox,
                                       host->simdata->smx_host);
 }
 
 msg_mailbox_t MSG_mailbox_get_by_alias(const char *alias)
 {
 
-  msg_mailbox_t mailbox = SIMIX_req_rdv_get_by_name(alias);
+  msg_mailbox_t mailbox = simcall_rdv_get_by_name(alias);
 
   if (!mailbox)
     mailbox = MSG_mailbox_new(alias);
@@ -92,7 +92,7 @@ MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, m_task_t * task,
 
   /* Try to receive it by calling SIMIX network layer */
   TRY {
-    SIMIX_req_comm_recv(mailbox, task, NULL, NULL, NULL, timeout);
+    simcall_comm_recv(mailbox, task, NULL, NULL, NULL, timeout);
     XBT_DEBUG("Got task %s from %p",(*task)->name,mailbox);
     (*task)->simdata->isused=0;
   }
@@ -154,16 +154,16 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, m_task_t task,
 
   /* Try to send it by calling SIMIX network layer */
   TRY {
-      smx_action_t comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+      smx_action_t comm = simcall_comm_isend(mailbox, t_simdata->message_size,
                                   t_simdata->rate, task, sizeof(void *),
                                   NULL, NULL, task, 0);
 #ifdef HAVE_TRACING
     if (TRACE_is_enabled()) {
-      SIMIX_req_set_category(comm, task->category);
+      simcall_set_category(comm, task->category);
     }
 #endif
      t_simdata->comm = comm;
-     SIMIX_req_comm_wait(comm, timeout);
+     simcall_comm_wait(comm, timeout);
   }
 
   CATCH(e) {
index 7b60abf..1c5a83f 100644 (file)
@@ -103,8 +103,8 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
 #define MSG_RETURN(val) do {PROCESS_SET_ERRNO(val);return(val);} while(0)
 /* #define CHECK_ERRNO()  ASSERT((PROCESS_GET_ERRNO()!=MSG_HOST_FAILURE),"Host failed, you cannot call this function.") */
 
-/*#define CHECK_HOST()  xbt_assert(SIMIX_req_host_get_state(SIMIX_host_self())==1,\
-                                  "Host failed, you cannot call this function. (state=%d)",SIMIX_req_host_get_state(SIMIX_host_self()))*/
+/*#define CHECK_HOST()  xbt_assert(simcall_host_get_state(SIMIX_host_self())==1,\
+                                  "Host failed, you cannot call this function. (state=%d)",simcall_host_get_state(SIMIX_host_self()))*/
 #else
 #  define MSG_RETURN(val) return(val)
 #endif
index 39c4a8f..59eb787 100644 (file)
@@ -42,8 +42,8 @@ void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc)
     SIMIX_process_self_set_data(smx_proc, NULL);
   }
   else {
-    msg_proc = SIMIX_req_process_get_data(smx_proc);
-    SIMIX_req_process_set_data(smx_proc, NULL);
+    msg_proc = simcall_process_get_data(smx_proc);
+    simcall_process_set_data(smx_proc, NULL);
   }
 
 #ifdef HAVE_TRACING
@@ -178,7 +178,7 @@ m_process_t MSG_process_create_with_environment(const char *name,
 
   /* Let's create the process: SIMIX may decide to start it right now,
    * even before returning the flow control to us */
-  SIMIX_req_process_create(&process, name, code, simdata, host->name,
+  simcall_process_create(&process, name, code, simdata, host->name,
                            argc, argv, properties);
 
   if (!process) {
@@ -211,12 +211,12 @@ void MSG_process_kill(m_process_t process)
 #endif
 
   /* FIXME: why do we only cancel communication actions? is this useful? */
-  simdata_process_t p_simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t p_simdata = simcall_process_get_data(process);
   if (p_simdata->waiting_task && p_simdata->waiting_task->simdata->comm) {
-    SIMIX_req_comm_cancel(p_simdata->waiting_task->simdata->comm);
+    simcall_comm_cancel(p_simdata->waiting_task->simdata->comm);
   }
  
-  SIMIX_req_process_kill(process);
+  simcall_process_kill(process);
 
   return;
 }
@@ -229,13 +229,13 @@ void MSG_process_kill(m_process_t process)
  */
 MSG_error_t MSG_process_migrate(m_process_t process, m_host_t host)
 {
-  simdata_process_t simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t simdata = simcall_process_get_data(process);
   simdata->m_host = host;
 #ifdef HAVE_TRACING
   m_host_t now = simdata->m_host;
   TRACE_msg_process_change_host(process, now, host);
 #endif
-  SIMIX_req_process_change_host(process, host->simdata->smx_host);
+  simcall_process_change_host(process, host->simdata->smx_host);
   return MSG_OK;
 }
 
@@ -250,7 +250,7 @@ void* MSG_process_get_data(m_process_t process)
   xbt_assert(process != NULL, "Invalid parameter");
 
   /* get from SIMIX the MSG process data, and then the user data */
-  simdata_process_t simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t simdata = simcall_process_get_data(process);
   return simdata->data;
 }
 
@@ -264,7 +264,7 @@ MSG_error_t MSG_process_set_data(m_process_t process, void *data)
 {
   xbt_assert(process != NULL, "Invalid parameter");
 
-  simdata_process_t simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t simdata = simcall_process_get_data(process);
   simdata->data = data;
 
   return MSG_OK;
@@ -294,7 +294,7 @@ m_host_t MSG_process_get_host(m_process_t process)
     simdata = SIMIX_process_self_get_data(SIMIX_process_self());
   }
   else {
-    simdata = SIMIX_req_process_get_data(process);
+    simdata = simcall_process_get_data(process);
   }
   return simdata->m_host;
 }
@@ -326,7 +326,7 @@ int MSG_process_get_PID(m_process_t process)
     return 0;
   }
 
-  simdata_process_t simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t simdata = simcall_process_get_data(process);
 
   return simdata != NULL ? simdata->PID : 0;
 }
@@ -342,7 +342,7 @@ int MSG_process_get_PPID(m_process_t process)
 {
   xbt_assert(process != NULL, "Invalid parameter");
 
-  simdata_process_t simdata = SIMIX_req_process_get_data(process);
+  simdata_process_t simdata = simcall_process_get_data(process);
 
   return simdata->PPID;
 }
@@ -357,7 +357,7 @@ const char *MSG_process_get_name(m_process_t process)
 {
   xbt_assert(process, "Invalid parameter");
 
-  return SIMIX_req_process_get_name(process);
+  return simcall_process_get_name(process);
 }
 
 /** \ingroup m_process_management
@@ -382,7 +382,7 @@ xbt_dict_t MSG_process_get_properties(m_process_t process)
 {
   xbt_assert(process != NULL, "Invalid parameter");
 
-  return SIMIX_req_process_get_properties(process);
+  return simcall_process_get_properties(process);
 
 }
 
@@ -432,7 +432,7 @@ MSG_error_t MSG_process_suspend(m_process_t process)
   TRACE_msg_process_suspend(process);
 #endif
 
-  SIMIX_req_process_suspend(process);
+  simcall_process_suspend(process);
   MSG_RETURN(MSG_OK);
 }
 
@@ -451,7 +451,7 @@ MSG_error_t MSG_process_resume(m_process_t process)
   TRACE_msg_process_resume(process);
 #endif
 
-  SIMIX_req_process_resume(process);
+  simcall_process_resume(process);
   MSG_RETURN(MSG_OK);
 }
 
@@ -464,7 +464,7 @@ MSG_error_t MSG_process_resume(m_process_t process)
 int MSG_process_is_suspended(m_process_t process)
 {
   xbt_assert(process != NULL, "Invalid parameter");
-  return SIMIX_req_process_is_suspended(process);
+  return simcall_process_is_suspended(process);
 }
 
 smx_context_t MSG_process_get_smx_ctx(m_process_t process) {
index 609dc7b..6698d82 100644 (file)
@@ -194,7 +194,7 @@ MSG_error_t MSG_task_destroy(m_task_t task)
 
   action = task->simdata->compute;
   if (action)
-    SIMIX_req_host_execution_destroy(action);
+    simcall_host_execution_destroy(action);
 
   /* parallel tasks only */
   xbt_free(task->simdata->host_list);
@@ -217,10 +217,10 @@ MSG_error_t MSG_task_cancel(m_task_t task)
   xbt_assert((task != NULL), "Invalid parameter");
 
   if (task->simdata->compute) {
-    SIMIX_req_host_execution_cancel(task->simdata->compute);
+    simcall_host_execution_cancel(task->simdata->compute);
   }
   else if (task->simdata->comm) {
-    SIMIX_req_comm_cancel(task->simdata->comm);
+    simcall_comm_cancel(task->simdata->comm);
     task->simdata->isused = 0;
   }
   return MSG_OK;
@@ -261,7 +261,7 @@ double MSG_task_get_remaining_computation(m_task_t task)
               && (task->simdata != NULL), "Invalid parameter");
 
   if (task->simdata->compute) {
-    return SIMIX_req_host_execution_get_remains(task->simdata->compute);
+    return simcall_host_execution_get_remains(task->simdata->compute);
   } else {
     return task->simdata->computation_amount;
   }
@@ -277,9 +277,9 @@ double MSG_task_get_remaining_communication(m_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
-  XBT_DEBUG("calling SIMIX_req_communication_get_remains(%p)",
+  XBT_DEBUG("calling simcall_communication_get_remains(%p)",
          task->simdata->comm);
-  return SIMIX_req_comm_get_remains(task->simdata->comm);
+  return simcall_comm_get_remains(task->simdata->comm);
 }
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
@@ -291,9 +291,9 @@ int MSG_task_is_latency_bounded(m_task_t task)
 {
   xbt_assert((task != NULL)
               && (task->simdata != NULL), "Invalid parameter");
-  XBT_DEBUG("calling SIMIX_req_communication_is_latency_bounded(%p)",
+  XBT_DEBUG("calling simcall_communication_is_latency_bounded(%p)",
          task->simdata->comm);
-  return SIMIX_req_comm_is_latency_bounded(task->simdata->comm);
+  return simcall_comm_is_latency_bounded(task->simdata->comm);
 }
 #endif
 
@@ -324,6 +324,6 @@ void MSG_task_set_priority(m_task_t task, double priority)
 
   task->simdata->priority = 1 / priority;
   if (task->simdata->compute)
-    SIMIX_req_host_execution_set_priority(task->simdata->compute,
+    simcall_host_execution_set_priority(task->simdata->compute,
                                       task->simdata->priority);
 }
index f69afc4..7563cb9 100644 (file)
@@ -61,20 +61,20 @@ The incredible performance of this approach comes at a price: using
 SimGrid this way is a *real* pain in the ass. You cannot use MSG nor
 GRAS nor SMPI nor nothing (because none of these interfaces were coded
 with the *extrem* requirement of the state_machine in mind), and you
-can only rely on SIMIX. From SIMIX, you can only use requests (ie, the
-SIMIX_req_* functions). Moreover, you must know that each blocking
-request will result in an interruption of your execution flow. 
+can only rely on SIMIX. From SIMIX, you can only use simcalls (ie, the
+simcall_* functions). Moreover, you must know that each blocking
+simcall will result in an interruption of your execution flow. 
 
 Let's take an example: If your code contains:
-   smx_action_t act = SIMIX_req_comm_isend(......);
-   SIMIX_req_comm_wait(act);
-   SIMIX_req_comm_destroy(act);
+   smx_action_t act = simcall_comm_isend(......);
+   simcall_comm_wait(act);
+   simcall_comm_destroy(act);
    
 The execution flow is interrupted brutally somewhere within
-SIMIX_req_comm_isend(), the variable act will never be set (and any
+simcall_comm_isend(), the variable act will never be set (and any
 code written after the first line is discarded).
 
-Indeed each SIMIX syscall results in an interruption of the calling
+Indeed each SIMIX simcall results in an interruption of the calling
 process, but in state_machine there is only one system stack and the
 whole state describing the process is in the structure describing it.
 So, when we need to remove one process from the system, to pause it,
@@ -83,10 +83,10 @@ in which maestro put it, whatever what the user process put on it.
 
 In short, each time simix wants to interrupt a process, state_machine
 does a longjmp(2) to the point just before calling the user code. As a
-result, each time you do a syscall, your stack is destroyed to restore
+result, each time you do a simcall, your stack is destroyed to restore
 it in the state where maestro put it before calling your code.
 
-This means that you cannot do anything after a syscall, and that the
+This means that you cannot do anything after a simcall, and that the
 stack is not a safe storing area for your data.
 
 So, you have to write your code as a state machine, with a big ugly
@@ -97,14 +97,14 @@ run_fun(globals, res) {
   switch (globals->state) {
   case l1: /* default value st. we take that branch the first time */
     globals->state = l2;
-    SIMIX_req_comm_isend(....); /* syscall=>hard interrupt on our code*/
+    simcall_comm_isend(....); /* syscall=>hard interrupt on our code */
   case l2: /* we'll take that branch the second time we're scheduled */
     globals->comm = res;
     globals->state = l3;
-    SIMIX_req_comm_wait(globals->comm); /* syscall=>interrupt */
+    simcall_comm_wait(globals->comm); /* syscall=>interrupt */
   case l3: 
     globals->state = where_you_want_to_go_today;
-    SIMIX_req_comm_destroy(globals->comm);
+    simcall_comm_destroy(globals->comm);
   }  
 }
 
index 47dcaae..dc1fe2d 100644 (file)
@@ -87,7 +87,7 @@ void smx_ctx_base_stop(smx_context_t context)
   if (context->cleanup_func)
     context->cleanup_func(context->data);
   context->iwannadie = 0;
-  SIMIX_req_process_cleanup(context->data);
+  simcall_process_cleanup(context->data);
   context->iwannadie = 1;
 }
 
index 6d41663..f5187d4 100644 (file)
@@ -75,7 +75,7 @@ static void parse_process_finalize(void)
                                             parse_argv,
                                             current_property_set);
     else
-      SIMIX_req_process_create(&process, parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv,
+      simcall_process_create(&process, parse_argv[0], parse_code, NULL, parse_host, parse_argc, parse_argv,
                                current_property_set);
     /* verify if process has been created (won't be the case if the host is currently dead, but that's fine) */
     if (!process) {
index 3be67bf..3d6682d 100644 (file)
@@ -203,8 +203,8 @@ void SIMIX_run(void)
               xbt_dynar_length(simix_global->process_to_run));
       SIMIX_process_runall();
       xbt_dynar_foreach(simix_global->process_that_ran, iter, process) {
-        if (process->request.call != REQ_NO_REQ) {
-          SIMIX_request_pre(&process->request, 0);
+        if (process->simcall.call != SIMCALL_NONE) {
+          SIMIX_simcall_pre(&process->simcall, 0);
         }
       }
     }
@@ -229,10 +229,10 @@ void SIMIX_run(void)
     xbt_dynar_foreach(model_list, iter, model) {
       set = model->states.failed_action_set;
       while ((action = xbt_swag_extract(set)))
-        SIMIX_request_post((smx_action_t) action->data);
+        SIMIX_simcall_post((smx_action_t) action->data);
       set = model->states.done_action_set;
       while ((action = xbt_swag_extract(set)))
-        SIMIX_request_post((smx_action_t) action->data);
+        SIMIX_simcall_post((smx_action_t) action->data);
     }
 
     /* Clean processes to destroy */
@@ -371,20 +371,20 @@ void SIMIX_display_process_status(void)
 
 static void* SIMIX_action_mallocator_new_f(void) {
   smx_action_t action = xbt_new(s_smx_action_t, 1);
-  action->request_list = xbt_fifo_new();
+  action->simcalls = xbt_fifo_new();
   return action;
 }
 
 static void SIMIX_action_mallocator_free_f(void* action) {
-  xbt_fifo_free(((smx_action_t) action)->request_list);
+  xbt_fifo_free(((smx_action_t) action)->simcalls);
   xbt_free(action);
 }
 
 static void SIMIX_action_mallocator_reset_f(void* action) {
 
-  // we also recycle the request list
-  xbt_fifo_t fifo = ((smx_action_t) action)->request_list;
+  // we also recycle the simcall list
+  xbt_fifo_t fifo = ((smx_action_t) action)->simcalls;
   xbt_fifo_reset(fifo);
   memset(action, 0, sizeof(s_smx_action_t));
-  ((smx_action_t) action)->request_list = fifo;
+  ((smx_action_t) action)->simcalls = fifo;
 }
index 15d9e16..e87041b 100644 (file)
@@ -111,7 +111,7 @@ smx_host_t SIMIX_host_self(void)
   return (process == NULL) ? NULL : SIMIX_process_get_host(process);
 }
 
-/* needs to be public and without request because it is called
+/* needs to be public and without simcall because it is called
    by exceptions and logging events */
 const char* SIMIX_host_self_get_name(void)
 {
@@ -295,18 +295,18 @@ void SIMIX_host_execution_set_priority(smx_action_t action, double priority)
     surf_workstation_model->set_priority(action->execution.surf_exec, priority);
 }
 
-void SIMIX_pre_host_execution_wait(smx_req_t req)
+void SIMIX_pre_host_execution_wait(smx_simcall_t simcall)
 {
-  smx_action_t action = req->host_execution_wait.execution;
+  smx_action_t action = simcall->host_execution_wait.execution;
 
   XBT_DEBUG("Wait for execution of action %p, state %d", action, action->state);
 
-  /* Associate this request to the action */
-  xbt_fifo_push(action->request_list, req);
-  req->issuer->waiting_action = action;
+  /* Associate this simcall to the action */
+  xbt_fifo_push(action->simcalls, simcall);
+  simcall->issuer->waiting_action = action;
 
   /* set surf's action */
-  if (MC_IS_ENABLED){
+  if (MC_IS_ENABLED) {
     action->state = SIMIX_DONE;
     SIMIX_execution_finish(action);
     return;
@@ -332,9 +332,9 @@ void SIMIX_host_execution_resume(smx_action_t action)
 void SIMIX_execution_finish(smx_action_t action)
 {
   volatile xbt_fifo_item_t item;
-  smx_req_t req;
+  smx_simcall_t simcall;
 
-  xbt_fifo_foreach(action->request_list, item, req, smx_req_t) {
+  xbt_fifo_foreach(action->simcalls, item, simcall, smx_simcall_t) {
 
     switch (action->state) {
 
@@ -344,12 +344,12 @@ void SIMIX_execution_finish(smx_action_t action)
         break;
 
       case SIMIX_FAILED:
-        XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", req->issuer->smx_host->name);
+        XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->smx_host->name);
         TRY {
           THROWF(host_error, 0, "Host failed");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-         req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+         simcall->issuer->doexception = 1;
        }
       break;
 
@@ -358,8 +358,8 @@ void SIMIX_execution_finish(smx_action_t action)
         TRY {
           THROWF(cancel_error, 0, "Canceled");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-         req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+         simcall->issuer->doexception = 1;
         }
        break;
 
@@ -367,9 +367,9 @@ void SIMIX_execution_finish(smx_action_t action)
         xbt_die("Internal error in SIMIX_execution_finish: unexpected action state %d",
             action->state);
     }
-    req->issuer->waiting_action = NULL;
-    req->host_execution_wait.result = action->state;
-    SIMIX_request_answer(req);
+    simcall->issuer->waiting_action = NULL;
+    simcall->host_execution_wait.result = action->state;
+    SIMIX_simcall_answer(simcall);
   }
 
   /* We no longer need it */
@@ -392,9 +392,10 @@ void SIMIX_post_host_execute(smx_action_t action)
     action->execution.surf_exec = NULL;
   }
 
-  /* If there are requests associated with the action, then answer them */
-  if (xbt_fifo_size(action->request_list))
+  /* If there are simcalls associated with the action, then answer them */
+  if (xbt_fifo_size(action->simcalls)) {
     SIMIX_execution_finish(action);
+  }
 }
 
 
index 206d26f..55efda3 100644 (file)
@@ -37,7 +37,7 @@ void SIMIX_host_execution_cancel(smx_action_t action);
 double SIMIX_host_execution_get_remains(smx_action_t action);
 e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action);
 void SIMIX_host_execution_set_priority(smx_action_t action, double priority);
-void SIMIX_pre_host_execution_wait(smx_req_t req);
+void SIMIX_pre_host_execution_wait(smx_simcall_t simcall);
 
 void SIMIX_host_execution_suspend(smx_action_t action);
 void SIMIX_host_execution_resume(smx_action_t action);
index a5a5c65..50ed47e 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_io, simix,
                                 "Logging specific to SIMIX (io)");
 
-void SIMIX_pre_file_read(smx_req_t req)
+void SIMIX_pre_file_read(smx_simcall_t simcall)
 {
-  smx_action_t action = SIMIX_file_read(req->issuer, req->file_read.name);
-  xbt_fifo_push(action->request_list, req);
-  req->issuer->waiting_action = action;
+  smx_action_t action = SIMIX_file_read(simcall->issuer, simcall->file_read.name);
+  xbt_fifo_push(action->simcalls, simcall);
+  simcall->issuer->waiting_action = action;
 }
 
 smx_action_t SIMIX_file_read(smx_process_t process, char* name)
@@ -81,9 +81,9 @@ void SIMIX_io_destroy(smx_action_t action)
 void SIMIX_io_finish(smx_action_t action)
 {
   volatile xbt_fifo_item_t item;
-  smx_req_t req;
+  smx_simcall_t simcall;
 
-  xbt_fifo_foreach(action->request_list, item, req, smx_req_t) {
+  xbt_fifo_foreach(action->simcalls, item, simcall, smx_simcall_t) {
 
     switch (action->state) {
 
@@ -95,8 +95,8 @@ void SIMIX_io_finish(smx_action_t action)
         TRY {
           THROWF(io_error, 0, "IO failed");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-         req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+         simcall->issuer->doexception = 1;
        }
       break;
 
@@ -104,8 +104,8 @@ void SIMIX_io_finish(smx_action_t action)
         TRY {
           THROWF(cancel_error, 0, "Canceled");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-         req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+         simcall->issuer->doexception = 1;
         }
        break;
 
@@ -113,8 +113,8 @@ void SIMIX_io_finish(smx_action_t action)
         xbt_die("Internal error in SIMIX_io_finish: unexpected action state %d",
             action->state);
     }
-    req->issuer->waiting_action = NULL;
-    SIMIX_request_answer(req);
+    simcall->issuer->waiting_action = NULL;
+    SIMIX_simcall_answer(simcall);
   }
 
   /* We no longer need it */
index a998ce1..ec2fa34 100644 (file)
@@ -10,7 +10,7 @@
 #include "simix/datatypes.h"
 #include "smx_smurf_private.h"
 
-void SIMIX_pre_file_read(smx_req_t req);
+void SIMIX_pre_file_read(smx_simcall_t simcall);
 smx_action_t SIMIX_file_read(smx_process_t process, char* name);
 void SIMIX_post_io(smx_action_t action);
 void SIMIX_io_destroy(smx_action_t action);
index 341da2a..d234bb3 100644 (file)
@@ -15,11 +15,11 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix,
 static xbt_dict_t rdv_points = NULL;
 unsigned long int smx_total_comms = 0;
 
-static void SIMIX_waitany_req_remove_from_actions(smx_req_t req);
+static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall);
 static void SIMIX_comm_copy_data(smx_action_t comm);
 static smx_action_t SIMIX_comm_new(e_smx_comm_type_t type);
 static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_action_t comm);
-static smx_action_t SIMIX_rdv_get_request(smx_rdv_t rdv, e_smx_comm_type_t type,
+static smx_action_t SIMIX_rdv_get_comm(smx_rdv_t rdv, e_smx_comm_type_t type,
                                          int (*match_fun)(void *, void *), void *);
 static void SIMIX_rdv_free(void *data);
 
@@ -39,7 +39,7 @@ void SIMIX_network_exit(void)
 
 smx_rdv_t SIMIX_rdv_create(const char *name)
 {
-  /* two processes may have pushed the same rdv_create request at the same time */
+  /* two processes may have pushed the same rdv_create simcall at the same time */
   smx_rdv_t rdv = name ? xbt_dict_get_or_null(rdv_points, name) : NULL;
 
   if (!rdv) {
@@ -92,9 +92,9 @@ smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv)
 }
 
 /**
- *  \brief Push a communication request into a rendez-vous point
+ *  \brief Pushes a communication action into a rendez-vous point
  *  \param rdv The rendez-vous point
- *  \param comm The communication request
+ *  \param comm The communication action
  */
 static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_action_t comm)
 {
@@ -103,9 +103,9 @@ static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_action_t comm)
 }
 
 /**
- *  \brief Remove a communication request from a rendez-vous point
+ *  \brief Removes a communication action from a rendez-vous point
  *  \param rdv The rendez-vous point
- *  \param comm The communication request
+ *  \param comm The communication action
  */
 XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm)
 {
@@ -114,10 +114,10 @@ XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm)
 }
 
 /**
- *  \brief Wrapper to SIMIX_rdv_get_request
+ *  \brief Wrapper to SIMIX_rdv_get_comm
  */
 smx_action_t SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data) {
-   return SIMIX_rdv_get_request(rdv, SIMIX_COMM_SEND, match_fun, data);
+   return SIMIX_rdv_get_comm(rdv, SIMIX_COMM_SEND, match_fun, data);
 }
 
 /**
@@ -125,21 +125,21 @@ smx_action_t SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, vo
  *  \param type The type of communication we are looking for (comm_send, comm_recv)
  *  \return The communication action if found, NULL otherwise
  */
-smx_action_t SIMIX_rdv_get_request(smx_rdv_t rdv, e_smx_comm_type_t type,
+smx_action_t SIMIX_rdv_get_comm(smx_rdv_t rdv, e_smx_comm_type_t type,
                                    int (*match_fun)(void *, void *), void *data)
 {
   // FIXME rewrite this function by using SIMIX_rdv_has_send/recv_match
   smx_action_t action;
   xbt_fifo_item_t item;
-  void* req_data = NULL;
+  void* comm_data = NULL;
 
   xbt_fifo_foreach(rdv->comm_fifo, item, action, smx_action_t) {
     if (action->comm.type == SIMIX_COMM_SEND) {
-      req_data = action->comm.src_data;
+      comm_data = action->comm.src_data;
     } else if (action->comm.type == SIMIX_COMM_RECEIVE) {
-      req_data = action->comm.dst_data;
+      comm_data = action->comm.dst_data;
     }
-    if (action->comm.type == type && (!match_fun || match_fun(data, req_data))) {
+    if (action->comm.type == type && (!match_fun || match_fun(data, comm_data))) {
       XBT_DEBUG("Found a matching communication action %p", action);
       xbt_fifo_remove_item(rdv->comm_fifo, item);
       xbt_fifo_free_item(item);
@@ -203,7 +203,7 @@ int SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), voi
 
 /**
  *  \brief Creates a new comunicate action
- *  \param type The type of request (comm_send, comm_recv)
+ *  \param type The direction of communication (comm_send, comm_recv)
  *  \return The new comunicate action
  */
 smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
@@ -305,9 +305,9 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
 {
   smx_action_t action;
 
-  /* Look for communication request matching our needs.
+  /* Look for communication action matching our needs.
      If it is not found then create it and push it into the rendez-vous point */
-  action = SIMIX_rdv_get_request(rdv, SIMIX_COMM_RECEIVE, match_fun, data);
+  action = SIMIX_rdv_get_comm(rdv, SIMIX_COMM_RECEIVE, match_fun, data);
 
   if (!action) {
     action = SIMIX_comm_new(SIMIX_COMM_SEND);
@@ -328,7 +328,7 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
     action->comm.clean_fun = NULL;
   }
 
-  /* Setup the communication request */
+  /* Setup the communication action */
   action->comm.src_proc = src_proc;
   action->comm.task_size = task_size;
   action->comm.rate = rate;
@@ -351,10 +351,10 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
 {
   smx_action_t action;
 
-  /* Look for communication request matching our needs.
+  /* Look for communication action matching our needs.
    * If it is not found then create it and push it into the rendez-vous point
    */
-  action = SIMIX_rdv_get_request(rdv, SIMIX_COMM_SEND, match_fun, data);
+  action = SIMIX_rdv_get_comm(rdv, SIMIX_COMM_SEND, match_fun, data);
 
   if (!action) {
     action = SIMIX_comm_new(SIMIX_COMM_RECEIVE);
@@ -365,7 +365,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
   }
   xbt_fifo_push(dst_proc->comms, action);
 
-  /* Setup communication request */
+  /* Setup communication action */
   action->comm.dst_proc = dst_proc;
   action->comm.dst_buff = dst_buff;
   action->comm.dst_buff_size = dst_buff_size;
@@ -380,26 +380,26 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
   return action;
 }
 
-void SIMIX_pre_comm_wait(smx_req_t req, smx_action_t action, double timeout, int idx)
+void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout, int idx)
 {
 
-  /* the request may be a wait, a send or a recv */
+  /* the simcall may be a wait, a send or a recv */
   surf_action_t sleep;
 
-  /* Associate this request to the action */
-  xbt_fifo_push(action->request_list, req);
-  req->issuer->waiting_action = action;
+  /* Associate this simcall to the wait action */
+  xbt_fifo_push(action->simcalls, simcall);
+  simcall->issuer->waiting_action = action;
 
   if (MC_IS_ENABLED) {
     if (idx == 0) {
       action->state = SIMIX_DONE;
     } else {
-      /* If we reached this point, the wait request must have a timeout */
+      /* If we reached this point, the wait simcall must have a timeout */
       /* Otherwise it shouldn't be enabled and executed by the MC */
       if (timeout == -1)
         THROW_IMPOSSIBLE;
 
-      if (action->comm.src_proc == req->issuer)
+      if (action->comm.src_proc == simcall->issuer)
         action->state = SIMIX_SRC_TIMEOUT;
       else
         action->state = SIMIX_DST_TIMEOUT;
@@ -414,90 +414,90 @@ void SIMIX_pre_comm_wait(smx_req_t req, smx_action_t action, double timeout, int
   if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING) {
     SIMIX_comm_finish(action);
   } else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
-    sleep = surf_workstation_model->extension.workstation.sleep(req->issuer->smx_host->host, timeout);
+    sleep = surf_workstation_model->extension.workstation.sleep(simcall->issuer->smx_host->host, timeout);
     surf_workstation_model->action_data_set(sleep, action);
 
-    if (req->issuer == action->comm.src_proc)
+    if (simcall->issuer == action->comm.src_proc)
       action->comm.src_timeout = sleep;
     else
       action->comm.dst_timeout = sleep;
   }
 }
 
-void SIMIX_pre_comm_test(smx_req_t req)
+void SIMIX_pre_comm_test(smx_simcall_t simcall)
 {
-  smx_action_t action = req->comm_test.comm;
+  smx_action_t action = simcall->comm_test.comm;
 
   if(MC_IS_ENABLED){
-    req->comm_test.result = action->comm.src_proc && action->comm.dst_proc;
-    if(req->comm_test.result){
+    simcall->comm_test.result = action->comm.src_proc && action->comm.dst_proc;
+    if(simcall->comm_test.result){
       action->state = SIMIX_DONE;
-      xbt_fifo_push(action->request_list, req);
+      xbt_fifo_push(action->simcalls, simcall);
       SIMIX_comm_finish(action);
     }else{
-      SIMIX_request_answer(req);
+      SIMIX_simcall_answer(simcall);
     }
     return;
   }
 
-  req->comm_test.result = (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING);
-  if (req->comm_test.result) {
-    xbt_fifo_push(action->request_list, req);
+  simcall->comm_test.result = (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING);
+  if (simcall->comm_test.result) {
+    xbt_fifo_push(action->simcalls, simcall);
     SIMIX_comm_finish(action);
   } else {
-    SIMIX_request_answer(req);
+    SIMIX_simcall_answer(simcall);
   }
 }
 
-void SIMIX_pre_comm_testany(smx_req_t req, int idx)
+void SIMIX_pre_comm_testany(smx_simcall_t simcall, int idx)
 {
   unsigned int cursor;
   smx_action_t action;
-  xbt_dynar_t actions = req->comm_testany.comms;
-  req->comm_testany.result = -1;
+  xbt_dynar_t actions = simcall->comm_testany.comms;
+  simcall->comm_testany.result = -1;
 
   if (MC_IS_ENABLED){
     if(idx == -1){
-      SIMIX_request_answer(req);
+      SIMIX_simcall_answer(simcall);
     }else{
       action = xbt_dynar_get_as(actions, idx, smx_action_t);
-      req->comm_testany.result = idx;
-      xbt_fifo_push(action->request_list, req);
+      simcall->comm_testany.result = idx;
+      xbt_fifo_push(action->simcalls, simcall);
       action->state = SIMIX_DONE;
       SIMIX_comm_finish(action);
     }
     return;
   }
 
-  xbt_dynar_foreach(req->comm_testany.comms,cursor,action) {
+  xbt_dynar_foreach(simcall->comm_testany.comms,cursor,action) {
     if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING) {
-      req->comm_testany.result = cursor;
-      xbt_fifo_push(action->request_list, req);
+      simcall->comm_testany.result = cursor;
+      xbt_fifo_push(action->simcalls, simcall);
       SIMIX_comm_finish(action);
       return;
     }
   }
-  SIMIX_request_answer(req);
+  SIMIX_simcall_answer(simcall);
 }
 
-void SIMIX_pre_comm_waitany(smx_req_t req, int idx)
+void SIMIX_pre_comm_waitany(smx_simcall_t simcall, int idx)
 {
   smx_action_t action;
   unsigned int cursor = 0;
-  xbt_dynar_t actions = req->comm_waitany.comms;
+  xbt_dynar_t actions = simcall->comm_waitany.comms;
 
   if (MC_IS_ENABLED){
     action = xbt_dynar_get_as(actions, idx, smx_action_t);
-    xbt_fifo_push(action->request_list, req);
-    req->comm_waitany.result = idx;
+    xbt_fifo_push(action->simcalls, simcall);
+    simcall->comm_waitany.result = idx;
     action->state = SIMIX_DONE;
     SIMIX_comm_finish(action);
     return;
   }
 
   xbt_dynar_foreach(actions, cursor, action){
-    /* associate this request to the the action */
-    xbt_fifo_push(action->request_list, req);
+    /* associate this simcall to the the action */
+    xbt_fifo_push(action->simcalls, simcall);
 
     /* see if the action is already finished */
     if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING){
@@ -507,22 +507,21 @@ void SIMIX_pre_comm_waitany(smx_req_t req, int idx)
   }
 }
 
-void SIMIX_waitany_req_remove_from_actions(smx_req_t req)
+void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall)
 {
   smx_action_t action;
   unsigned int cursor = 0;
-  xbt_dynar_t actions = req->comm_waitany.comms;
+  xbt_dynar_t actions = simcall->comm_waitany.comms;
 
-  xbt_dynar_foreach(actions, cursor, action){
-    xbt_fifo_remove(action->request_list, req);
+  xbt_dynar_foreach(actions, cursor, action) {
+    xbt_fifo_remove(action->simcalls, simcall);
   }
 }
 
 /**
- *  \brief Start the simulation of a communication request
- *  \param action The communication action
+ *  \brief Starts the simulation of a communication action.
+ *  \param action the communication action
  */
-
 XBT_INLINE void SIMIX_comm_start(smx_action_t action)
 {
   /* If both the sender and the receiver are already there, start the communication */
@@ -560,24 +559,24 @@ XBT_INLINE void SIMIX_comm_start(smx_action_t action)
 }
 
 /**
- * \brief Answers the SIMIX requests associated to a communication action.
+ * \brief Answers the SIMIX simcalls associated to a communication action.
  * \param action a finished communication action
  */
 void SIMIX_comm_finish(smx_action_t action)
 {
   volatile unsigned int destroy_count = 0;
-  smx_req_t req;
+  smx_simcall_t simcall;
 
-  while ((req = xbt_fifo_shift(action->request_list))) {
+  while ((simcall = xbt_fifo_shift(action->simcalls))) {
 
-    /* If a waitany request is waiting for this action to finish, then remove
+    /* If a waitany simcall is waiting for this action to finish, then remove
        it from the other actions in the waitany list. Afterwards, get the
-       position of the actual action in the waitany request's actions dynar and
-       return it as the result of the call */
-    if (req->call == REQ_COMM_WAITANY) {
-      SIMIX_waitany_req_remove_from_actions(req);
+       position of the actual action in the waitany dynar and
+       return it as the result of the simcall */
+    if (simcall->call == SIMCALL_COMM_WAITANY) {
+      SIMIX_waitany_remove_simcall_from_actions(simcall);
       if (!MC_IS_ENABLED)
-        req->comm_waitany.result = xbt_dynar_search(req->comm_waitany.comms, &action);
+        simcall->comm_waitany.result = xbt_dynar_search(simcall->comm_waitany.comms, &action);
     }
 
     /* If the action is still in a rendez-vous point then remove from it */
@@ -598,8 +597,8 @@ void SIMIX_comm_finish(smx_action_t action)
         TRY {
           THROWF(timeout_error, 0, "Communication timeouted because of sender");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-          req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+          simcall->issuer->doexception = 1;
         }
         break;
 
@@ -607,32 +606,32 @@ void SIMIX_comm_finish(smx_action_t action)
         TRY {
           THROWF(timeout_error, 0, "Communication timeouted because of receiver");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-          req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+          simcall->issuer->doexception = 1;
         }
         break;
 
       case SIMIX_SRC_HOST_FAILURE:
         TRY {
-          if (req->issuer == action->comm.src_proc)
+          if (simcall->issuer == action->comm.src_proc)
             THROWF(host_error, 0, "Host failed");
           else
             THROWF(network_error, 0, "Remote peer failed");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-          req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+          simcall->issuer->doexception = 1;
         }
         break;
 
       case SIMIX_DST_HOST_FAILURE:
         TRY {
-          if (req->issuer == action->comm.dst_proc)
+          if (simcall->issuer == action->comm.dst_proc)
             THROWF(host_error, 0, "Host failed");
           else
             THROWF(network_error, 0, "Remote peer failed");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-          req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+          simcall->issuer->doexception = 1;
         }
         break;
 
@@ -642,32 +641,32 @@ void SIMIX_comm_finish(smx_action_t action)
               action,
               action->comm.src_proc ? action->comm.src_proc->smx_host->name : NULL,
               action->comm.dst_proc ? action->comm.dst_proc->smx_host->name : NULL,
-              req->issuer->name, req->issuer, action->comm.detached);
-          if (action->comm.src_proc == req->issuer) {
+              simcall->issuer->name, simcall->issuer, action->comm.detached);
+          if (action->comm.src_proc == simcall->issuer) {
             XBT_DEBUG("I'm source");
-          } else if (action->comm.dst_proc == req->issuer) {
+          } else if (action->comm.dst_proc == simcall->issuer) {
             XBT_DEBUG("I'm dest");
           } else {
             XBT_DEBUG("I'm neither source nor dest");
           }
           THROWF(network_error, 0, "Link failure");
         }
-       CATCH(req->issuer->running_ctx->exception) {
-          req->issuer->doexception = 1;
+       CATCH(simcall->issuer->running_ctx->exception) {
+          simcall->issuer->doexception = 1;
         }
         break;
 
       case SIMIX_CANCELED:
         TRY {
-          if (req->issuer == action->comm.dst_proc) {
+          if (simcall->issuer == action->comm.dst_proc) {
             THROWF(cancel_error, 0, "Communication canceled by the sender");
           }
           else {
             THROWF(cancel_error, 0, "Communication canceled by the receiver");
           }
         }
-        CATCH(req->issuer->running_ctx->exception) {
-          req->issuer->doexception = 1;
+        CATCH(simcall->issuer->running_ctx->exception) {
+          simcall->issuer->doexception = 1;
         }
         break;
 
@@ -676,18 +675,18 @@ void SIMIX_comm_finish(smx_action_t action)
     }
 
     /* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
-    if (req->issuer->doexception) {
-      if (req->call == REQ_COMM_WAITANY) {
-        req->issuer->running_ctx->exception.value = xbt_dynar_search(req->comm_waitany.comms, &action);
+    if (simcall->issuer->doexception) {
+      if (simcall->call == SIMCALL_COMM_WAITANY) {
+        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall->comm_waitany.comms, &action);
       }
-      else if (req->call == REQ_COMM_TESTANY) {
-        req->issuer->running_ctx->exception.value = xbt_dynar_search(req->comm_testany.comms, &action);
+      else if (simcall->call == SIMCALL_COMM_TESTANY) {
+        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall->comm_testany.comms, &action);
       }
     }
 
-    req->issuer->waiting_action = NULL;
-    xbt_fifo_remove(req->issuer->comms, action);
-    SIMIX_request_answer(req);
+    simcall->issuer->waiting_action = NULL;
+    xbt_fifo_remove(simcall->issuer->comms, action);
+    SIMIX_simcall_answer(simcall);
     destroy_count++;
   }
 
@@ -736,8 +735,8 @@ void SIMIX_post_comm(smx_action_t action)
     xbt_fifo_remove(action->comm.dst_proc->comms, action);
   }
 
-  /* if there are requests associated with the action, then answer them */
-  if (xbt_fifo_size(action->request_list)) {
+  /* if there are simcalls associated with the action, then answer them */
+  if (xbt_fifo_size(action->simcalls)) {
     SIMIX_comm_finish(action);
   }
 }
index 11b4cbb..caf5dbd 100644 (file)
@@ -52,11 +52,11 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
                               int (*)(void *, void *), void *data);
 void SIMIX_comm_destroy(smx_action_t action);
 void SIMIX_comm_destroy_internal_actions(smx_action_t action);
-void SIMIX_pre_comm_wait(smx_req_t req, smx_action_t action, double timeout, int idx);
-void SIMIX_pre_comm_waitany(smx_req_t req, int idx);
+void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout, int idx);
+void SIMIX_pre_comm_waitany(smx_simcall_t simcall, int idx);
 void SIMIX_post_comm(smx_action_t action);
-void SIMIX_pre_comm_test(smx_req_t req);
-void SIMIX_pre_comm_testany(smx_req_t req, int idx);
+void SIMIX_pre_comm_test(smx_simcall_t simcall);
+void SIMIX_pre_comm_testany(smx_simcall_t simcall, int idx);
 void SIMIX_comm_cancel(smx_action_t action);
 double SIMIX_comm_get_remains(smx_action_t action);
 e_smx_state_t SIMIX_comm_get_state(smx_action_t action);
index e15730f..2482f68 100644 (file)
@@ -79,7 +79,7 @@ typedef struct s_smx_action {
   e_smx_action_type_t type;          /* Type of SIMIX action*/
   e_smx_state_t state;               /* State of the action */
   char *name;                        /* Action name if any */
-  xbt_fifo_t request_list;           /* List of requests on this action */
+  xbt_fifo_t simcalls;               /* List of simcalls waiting for this action */
 
   /* Data specific to each action type */
   union {
index af808cc..a6ed91e 100644 (file)
@@ -136,7 +136,7 @@ void SIMIX_create_maestro_process()
   maestro->running_ctx = xbt_new(xbt_running_ctx_t, 1);
   XBT_RUNNING_CTX_INITIALIZE(maestro->running_ctx);
   maestro->context = SIMIX_context_new(NULL, 0, NULL, NULL, maestro);
-  maestro->request.issuer = maestro;
+  maestro->simcall.issuer = maestro;
 
   simix_global->maestro_process = maestro;
   return;
@@ -166,7 +166,7 @@ smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) {
  * \brief Internal function to create a process.
  *
  * This function actually creates the process.
- * It may be called when a REQ_PROCESS_CREATE request occurs,
+ * It may be called when a SIMCALL_PROCESS_CREATE simcall occurs,
  * or directly for SIMIX internal purposes.
  *
  * \return the process created
@@ -199,7 +199,7 @@ void SIMIX_process_create(smx_process_t *process,
     (*process)->smx_host = host;
     (*process)->data = data;
     (*process)->comms = xbt_fifo_new();
-    (*process)->request.issuer = *process;
+    (*process)->simcall.issuer = *process;
 
     XBT_VERB("Create context %s", (*process)->name);
     (*process)->context = SIMIX_context_new(code, argc, argv,
@@ -245,7 +245,7 @@ void SIMIX_process_runall(void)
 /**
  * \brief Internal function to kill a SIMIX process.
  *
- * This function may be called when a REQ_PROCESS_KILL request occurs,
+ * This function may be called when a SIMCALL_PROCESS_KILL simcall occurs,
  * or directly for SIMIX internal purposes.
  *
  * \param process poor victim
@@ -279,7 +279,7 @@ void SIMIX_process_kill(smx_process_t process) {
        break;
 
       case SIMIX_ACTION_SYNCHRO:
-       SIMIX_synchro_stop_waiting(process, &process->request);
+       SIMIX_synchro_stop_waiting(process, &process->simcall);
        SIMIX_synchro_destroy(process->waiting_action);
        break;
 
@@ -325,15 +325,15 @@ void SIMIX_pre_process_change_host(smx_process_t process, smx_host_t dest)
   process->new_host = dest;
 }
 
-void SIMIX_pre_process_suspend(smx_req_t req)
+void SIMIX_pre_process_suspend(smx_simcall_t simcall)
 {
-  smx_process_t process = req->process_suspend.process;
-  SIMIX_process_suspend(process, req->issuer);
+  smx_process_t process = simcall->process_suspend.process;
+  SIMIX_process_suspend(process, simcall->issuer);
 
-  if (process != req->issuer) {
-    SIMIX_request_answer(req);
+  if (process != simcall->issuer) {
+    SIMIX_simcall_answer(simcall);
   }
-  /* If we are suspending ourselves, then just do not replay the request. */
+  /* If we are suspending ourselves, then just do not finish the simcall now */
 }
 
 void SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
@@ -460,7 +460,7 @@ smx_host_t SIMIX_process_get_host(smx_process_t process)
   return process->smx_host;
 }
 
-/* needs to be public and without request because it is called
+/* needs to be public and without simcall because it is called
    by exceptions and logging events */
 const char* SIMIX_process_self_get_name(void) {
 
@@ -498,17 +498,17 @@ xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
   return process->properties;
 }
 
-void SIMIX_pre_process_sleep(smx_req_t req)
+void SIMIX_pre_process_sleep(smx_simcall_t simcall)
 {
   if (MC_IS_ENABLED) {
-    MC_process_clock_add(req->issuer, req->process_sleep.duration);
-    req->process_sleep.result = SIMIX_DONE;
-    SIMIX_request_answer(req);
+    MC_process_clock_add(simcall->issuer, simcall->process_sleep.duration);
+    simcall->process_sleep.result = SIMIX_DONE;
+    SIMIX_simcall_answer(simcall);
     return;
   }
-  smx_action_t action = SIMIX_process_sleep(req->issuer, req->process_sleep.duration);
-  xbt_fifo_push(action->request_list, req);
-  req->issuer->waiting_action = action;
+  smx_action_t action = SIMIX_process_sleep(simcall->issuer, simcall->process_sleep.duration);
+  xbt_fifo_push(action->simcalls, simcall);
+  simcall->issuer->waiting_action = action;
 }
 
 smx_action_t SIMIX_process_sleep(smx_process_t process, double duration)
@@ -542,10 +542,10 @@ smx_action_t SIMIX_process_sleep(smx_process_t process, double duration)
 
 void SIMIX_post_process_sleep(smx_action_t action)
 {
-  smx_req_t req;
+  smx_simcall_t simcall;
   e_smx_state_t state;
 
-  while ((req = xbt_fifo_shift(action->request_list))) {
+  while ((simcall = xbt_fifo_shift(action->simcalls))) {
 
     switch(surf_workstation_model->action_state_get(action->sleep.surf_sleep)){
       case SURF_ACTION_FAILED:
@@ -560,9 +560,9 @@ void SIMIX_post_process_sleep(smx_action_t action)
         THROW_IMPOSSIBLE;
         break;
     }
-    req->process_sleep.result = state;
-    req->issuer->waiting_action = NULL;
-    SIMIX_request_answer(req);
+    simcall->process_sleep.result = state;
+    simcall->issuer->waiting_action = NULL;
+    SIMIX_simcall_answer(simcall);
   }
   SIMIX_process_sleep_destroy(action);
 }
index 4d208e8..bdf84df 100644 (file)
@@ -29,7 +29,7 @@ typedef struct s_smx_process {
   smx_action_t waiting_action;  /* the current blocking action if any */
   xbt_fifo_t comms;       /* the current non-blocking communication actions */
   xbt_dict_t properties;
-  s_smx_req_t request;
+  s_smx_simcall_t simcall;
   void *data;                   /* kept for compatibility, it should be replaced with moddata */
 
 } s_smx_process_t;
@@ -67,7 +67,7 @@ void SIMIX_pre_process_change_host(smx_process_t process,
 void SIMIX_process_change_host(smx_process_t process,
                               smx_host_t dest);
 void SIMIX_pre_process_change_host(smx_process_t process, smx_host_t host);
-void SIMIX_pre_process_suspend(smx_req_t req);
+void SIMIX_pre_process_suspend(smx_simcall_t simcall);
 void SIMIX_process_suspend(smx_process_t process, smx_process_t issuer);
 void SIMIX_process_resume(smx_process_t process, smx_process_t issuer);
 void* SIMIX_process_get_data(smx_process_t process);
@@ -77,7 +77,7 @@ const char* SIMIX_process_get_name(smx_process_t process);
 smx_process_t SIMIX_process_get_by_name(const char* name);
 int SIMIX_process_is_suspended(smx_process_t process);
 xbt_dict_t SIMIX_process_get_properties(smx_process_t process);
-void SIMIX_pre_process_sleep(smx_req_t req);
+void SIMIX_pre_process_sleep(smx_simcall_t simcall);
 smx_action_t SIMIX_process_sleep(smx_process_t process, double duration);
 void SIMIX_post_process_sleep(smx_action_t action);
 
index ba1f614..d16d6df 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_smurf, simix,
                                 "Logging specific to SIMIX (SMURF)");
 
-XBT_INLINE smx_req_t SIMIX_req_mine()
+XBT_INLINE smx_simcall_t SIMIX_simcall_mine()
 {
   smx_process_t issuer = SIMIX_process_self();
-  return &issuer->request;
+  return &issuer->simcall;
 }
 
 /**
- * \brief Makes the current process do a request to the kernel and yields
+ * \brief Makes the current process do a simcall to the kernel and yields
  * until completion.
  * \param self the current process
  */
-void SIMIX_request_push(smx_process_t self)
+void SIMIX_simcall_push(smx_process_t self)
 {
   if (self != simix_global->maestro_process) {
-    XBT_DEBUG("Yield process '%s' on request of type %s (%d)", self->name,
-        SIMIX_request_name(self->request.call), self->request.call);
+    XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
+        SIMIX_simcall_name(self->simcall.call), self->simcall.call);
     SIMIX_process_yield(self);
   } else {
-    SIMIX_request_pre(&self->request, 0);
+    SIMIX_simcall_pre(&self->simcall, 0);
   }
 }
 
-void SIMIX_request_answer(smx_req_t req)
+void SIMIX_simcall_answer(smx_simcall_t simcall)
 {
-  if (req->issuer != simix_global->maestro_process){
-    XBT_DEBUG("Answer request %s (%d) issued by %s (%p)", SIMIX_request_name(req->call), req->call,
-        req->issuer->name, req->issuer);
-    req->issuer->request.call = REQ_NO_REQ;
-    xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, req->issuer);
+  if (simcall->issuer != simix_global->maestro_process){
+    XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), simcall->call,
+        simcall->issuer->name, simcall->issuer);
+    simcall->issuer->simcall.call = SIMCALL_NONE;
+    xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, simcall->issuer);
   }
 }
 
-void SIMIX_request_pre(smx_req_t req, int value)
+void SIMIX_simcall_pre(smx_simcall_t simcall, int value)
 {
-  XBT_DEBUG("Handling request %p: %s", req, SIMIX_request_name(req->call));
+  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
 
-  switch (req->call) {
-    case REQ_COMM_TEST:
-      SIMIX_pre_comm_test(req);
+  switch (simcall->call) {
+    case SIMCALL_COMM_TEST:
+      SIMIX_pre_comm_test(simcall);
       break;
 
-    case REQ_COMM_TESTANY:
-      SIMIX_pre_comm_testany(req, value);
+    case SIMCALL_COMM_TESTANY:
+      SIMIX_pre_comm_testany(simcall, value);
       break;
 
-    case REQ_COMM_WAIT:
-      SIMIX_pre_comm_wait(req,
-          req->comm_wait.comm,
-          req->comm_wait.timeout,
+    case SIMCALL_COMM_WAIT:
+      SIMIX_pre_comm_wait(simcall,
+          simcall->comm_wait.comm,
+          simcall->comm_wait.timeout,
           value);
       break;
 
-    case REQ_COMM_WAITANY:
-      SIMIX_pre_comm_waitany(req, value);
+    case SIMCALL_COMM_WAITANY:
+      SIMIX_pre_comm_waitany(simcall, value);
       break;
 
-    case REQ_COMM_SEND:
+    case SIMCALL_COMM_SEND:
     {
       smx_action_t comm = SIMIX_comm_isend(
-          req->issuer,
-          req->comm_send.rdv,
-          req->comm_send.task_size,
-          req->comm_send.rate,
-          req->comm_send.src_buff,
-          req->comm_send.src_buff_size,
-          req->comm_send.match_fun,
+          simcall->issuer,
+          simcall->comm_send.rdv,
+          simcall->comm_send.task_size,
+          simcall->comm_send.rate,
+          simcall->comm_send.src_buff,
+          simcall->comm_send.src_buff_size,
+          simcall->comm_send.match_fun,
           NULL, /* no clean function since it's not detached */
-          req->comm_send.data,
+          simcall->comm_send.data,
           0);
-      SIMIX_pre_comm_wait(req, comm, req->comm_send.timeout, 0);
+      SIMIX_pre_comm_wait(simcall, comm, simcall->comm_send.timeout, 0);
       break;
     }
 
-    case REQ_COMM_ISEND:
-      req->comm_isend.result = SIMIX_comm_isend(
-          req->issuer,
-          req->comm_isend.rdv,
-          req->comm_isend.task_size,
-          req->comm_isend.rate,
-          req->comm_isend.src_buff,
-          req->comm_isend.src_buff_size,
-          req->comm_isend.match_fun,
-          req->comm_isend.clean_fun,
-          req->comm_isend.data,
-          req->comm_isend.detached);
-      SIMIX_request_answer(req);
-      break;
-
-    case REQ_COMM_RECV:
+    case SIMCALL_COMM_ISEND:
+      simcall->comm_isend.result = SIMIX_comm_isend(
+          simcall->issuer,
+          simcall->comm_isend.rdv,
+          simcall->comm_isend.task_size,
+          simcall->comm_isend.rate,
+          simcall->comm_isend.src_buff,
+          simcall->comm_isend.src_buff_size,
+          simcall->comm_isend.match_fun,
+          simcall->comm_isend.clean_fun,
+          simcall->comm_isend.data,
+          simcall->comm_isend.detached);
+      SIMIX_simcall_answer(simcall);
+      break;
+
+    case SIMCALL_COMM_RECV:
     {
       smx_action_t comm = SIMIX_comm_irecv(
-          req->issuer,
-          req->comm_recv.rdv,
-          req->comm_recv.dst_buff,
-          req->comm_recv.dst_buff_size,
-          req->comm_recv.match_fun,
-          req->comm_recv.data);
-      SIMIX_pre_comm_wait(req, comm, req->comm_recv.timeout, 0);
+          simcall->issuer,
+          simcall->comm_recv.rdv,
+          simcall->comm_recv.dst_buff,
+          simcall->comm_recv.dst_buff_size,
+          simcall->comm_recv.match_fun,
+          simcall->comm_recv.data);
+      SIMIX_pre_comm_wait(simcall, comm, simcall->comm_recv.timeout, 0);
       break;
     }
 
-    case REQ_COMM_IRECV:
-      req->comm_irecv.result = SIMIX_comm_irecv(
-          req->issuer,
-          req->comm_irecv.rdv,
-          req->comm_irecv.dst_buff,
-          req->comm_irecv.dst_buff_size,
-          req->comm_irecv.match_fun,
-          req->comm_irecv.data);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_IRECV:
+      simcall->comm_irecv.result = SIMIX_comm_irecv(
+          simcall->issuer,
+          simcall->comm_irecv.rdv,
+          simcall->comm_irecv.dst_buff,
+          simcall->comm_irecv.dst_buff_size,
+          simcall->comm_irecv.match_fun,
+          simcall->comm_irecv.data);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_DESTROY:
-      SIMIX_comm_destroy(req->comm_destroy.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_DESTROY:
+      SIMIX_comm_destroy(simcall->comm_destroy.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_CANCEL:
-      SIMIX_comm_cancel(req->comm_cancel.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_CANCEL:
+      SIMIX_comm_cancel(simcall->comm_cancel.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_GET_REMAINS:
-      req->comm_get_remains.result =
-          SIMIX_comm_get_remains(req->comm_get_remains.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_GET_REMAINS:
+      simcall->comm_get_remains.result =
+          SIMIX_comm_get_remains(simcall->comm_get_remains.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_GET_STATE:
-      req->comm_get_state.result =
-          SIMIX_comm_get_state(req->comm_get_state.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_GET_STATE:
+      simcall->comm_get_state.result =
+          SIMIX_comm_get_state(simcall->comm_get_state.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_GET_SRC_DATA:
-      req->comm_get_src_data.result = SIMIX_comm_get_src_data(req->comm_get_src_data.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_GET_SRC_DATA:
+      simcall->comm_get_src_data.result = SIMIX_comm_get_src_data(simcall->comm_get_src_data.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_GET_DST_DATA:
-      req->comm_get_dst_data.result = SIMIX_comm_get_dst_data(req->comm_get_dst_data.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_GET_DST_DATA:
+      simcall->comm_get_dst_data.result = SIMIX_comm_get_dst_data(simcall->comm_get_dst_data.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_GET_SRC_PROC:
-      req->comm_get_src_proc.result =
-          SIMIX_comm_get_src_proc(req->comm_get_src_proc.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_GET_SRC_PROC:
+      simcall->comm_get_src_proc.result =
+          SIMIX_comm_get_src_proc(simcall->comm_get_src_proc.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COMM_GET_DST_PROC:
-      req->comm_get_dst_proc.result =
-          SIMIX_comm_get_dst_proc(req->comm_get_dst_proc.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_GET_DST_PROC:
+      simcall->comm_get_dst_proc.result =
+          SIMIX_comm_get_dst_proc(simcall->comm_get_dst_proc.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-    case REQ_COMM_IS_LATENCY_BOUNDED:
-      req->comm_is_latency_bounded.result =
-          SIMIX_comm_is_latency_bounded(req->comm_is_latency_bounded.comm);
-      SIMIX_request_answer(req);
+    case SIMCALL_COMM_IS_LATENCY_BOUNDED:
+      simcall->comm_is_latency_bounded.result =
+          SIMIX_comm_is_latency_bounded(simcall->comm_is_latency_bounded.comm);
+      SIMIX_simcall_answer(simcall);
       break;
 #endif
 
-    case REQ_RDV_CREATE:
-      req->rdv_create.result = SIMIX_rdv_create(req->rdv_create.name);
-      SIMIX_request_answer(req);
+    case SIMCALL_RDV_CREATE:
+      simcall->rdv_create.result = SIMIX_rdv_create(simcall->rdv_create.name);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_RDV_DESTROY:
-      SIMIX_rdv_destroy(req->rdv_destroy.rdv);
-      SIMIX_request_answer(req);
+    case SIMCALL_RDV_DESTROY:
+      SIMIX_rdv_destroy(simcall->rdv_destroy.rdv);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_RDV_GEY_BY_NAME:
-      req->rdv_get_by_name.result =
-        SIMIX_rdv_get_by_name(req->rdv_get_by_name.name);
-      SIMIX_request_answer(req);
+    case SIMCALL_RDV_GEY_BY_NAME:
+      simcall->rdv_get_by_name.result =
+        SIMIX_rdv_get_by_name(simcall->rdv_get_by_name.name);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_RDV_COMM_COUNT_BY_HOST:
-      req->rdv_comm_count_by_host.result = SIMIX_rdv_comm_count_by_host(
-          req->rdv_comm_count_by_host.rdv,
-          req->rdv_comm_count_by_host.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_RDV_COMM_COUNT_BY_HOST:
+      simcall->rdv_comm_count_by_host.result = SIMIX_rdv_comm_count_by_host(
+          simcall->rdv_comm_count_by_host.rdv,
+          simcall->rdv_comm_count_by_host.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_RDV_GET_HEAD:
-      req->rdv_get_head.result = SIMIX_rdv_get_head(req->rdv_get_head.rdv);
-      SIMIX_request_answer(req);
+    case SIMCALL_RDV_GET_HEAD:
+      simcall->rdv_get_head.result = SIMIX_rdv_get_head(simcall->rdv_get_head.rdv);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_BY_NAME:
-      req->host_get_by_name.result =
-        SIMIX_host_get_by_name(req->host_get_by_name.name);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_BY_NAME:
+      simcall->host_get_by_name.result =
+        SIMIX_host_get_by_name(simcall->host_get_by_name.name);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_NAME:
-      req->host_get_name.result =      SIMIX_host_get_name(req->host_get_name.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_NAME:
+      simcall->host_get_name.result =  SIMIX_host_get_name(simcall->host_get_name.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_PROPERTIES:
-      req->host_get_properties.result =
-        SIMIX_host_get_properties(req->host_get_properties.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_PROPERTIES:
+      simcall->host_get_properties.result =
+        SIMIX_host_get_properties(simcall->host_get_properties.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_SPEED:
-      req->host_get_speed.result = 
-        SIMIX_host_get_speed(req->host_get_speed.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_SPEED:
+      simcall->host_get_speed.result = 
+        SIMIX_host_get_speed(simcall->host_get_speed.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_AVAILABLE_SPEED:
-      req->host_get_available_speed.result =
-       SIMIX_host_get_available_speed(req->host_get_available_speed.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_AVAILABLE_SPEED:
+      simcall->host_get_available_speed.result =
+       SIMIX_host_get_available_speed(simcall->host_get_available_speed.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_STATE:
-      req->host_get_state.result = 
-        SIMIX_host_get_state(req->host_get_state.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_STATE:
+      simcall->host_get_state.result = 
+        SIMIX_host_get_state(simcall->host_get_state.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_GET_DATA:
-      req->host_get_data.result =      SIMIX_host_get_data(req->host_get_data.host);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_GET_DATA:
+      simcall->host_get_data.result =  SIMIX_host_get_data(simcall->host_get_data.host);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_SET_DATA:
-      SIMIX_host_set_data(req->host_set_data.host, req->host_set_data.data);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_SET_DATA:
+      SIMIX_host_set_data(simcall->host_set_data.host, simcall->host_set_data.data);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTE:
-      req->host_execute.result = SIMIX_host_execute(
-         req->host_execute.name,
-         req->host_execute.host,
-         req->host_execute.computation_amount,
-         req->host_execute.priority);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_EXECUTE:
+      simcall->host_execute.result = SIMIX_host_execute(
+         simcall->host_execute.name,
+         simcall->host_execute.host,
+         simcall->host_execute.computation_amount,
+         simcall->host_execute.priority);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_PARALLEL_EXECUTE:
-      req->host_parallel_execute.result = SIMIX_host_parallel_execute(
-         req->host_parallel_execute.name,
-         req->host_parallel_execute.host_nb,
-         req->host_parallel_execute.host_list,
-         req->host_parallel_execute.computation_amount,
-         req->host_parallel_execute.communication_amount,
-         req->host_parallel_execute.amount,
-         req->host_parallel_execute.rate);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_PARALLEL_EXECUTE:
+      simcall->host_parallel_execute.result = SIMIX_host_parallel_execute(
+         simcall->host_parallel_execute.name,
+         simcall->host_parallel_execute.host_nb,
+         simcall->host_parallel_execute.host_list,
+         simcall->host_parallel_execute.computation_amount,
+         simcall->host_parallel_execute.communication_amount,
+         simcall->host_parallel_execute.amount,
+         simcall->host_parallel_execute.rate);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTION_DESTROY:
-      SIMIX_host_execution_destroy(req->host_execution_destroy.execution);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_EXECUTION_DESTROY:
+      SIMIX_host_execution_destroy(simcall->host_execution_destroy.execution);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTION_CANCEL:
-      SIMIX_host_execution_cancel(req->host_execution_cancel.execution);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_EXECUTION_CANCEL:
+      SIMIX_host_execution_cancel(simcall->host_execution_cancel.execution);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTION_GET_REMAINS:
-      req->host_execution_get_remains.result =
-        SIMIX_host_execution_get_remains(req->host_execution_get_remains.execution);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_EXECUTION_GET_REMAINS:
+      simcall->host_execution_get_remains.result =
+        SIMIX_host_execution_get_remains(simcall->host_execution_get_remains.execution);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTION_GET_STATE:
-      req->host_execution_get_state.result =
-       SIMIX_host_execution_get_state(req->host_execution_get_state.execution);
-      SIMIX_request_answer(req);
+    case SIMCALL_HOST_EXECUTION_GET_STATE:
+      simcall->host_execution_get_state.result =
+       SIMIX_host_execution_get_state(simcall->host_execution_get_state.execution);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTION_SET_PRIORITY:
+    case SIMCALL_HOST_EXECUTION_SET_PRIORITY:
       SIMIX_host_execution_set_priority(
-         req->host_execution_set_priority.execution,
-         req->host_execution_set_priority.priority);
-      SIMIX_request_answer(req);
+         simcall->host_execution_set_priority.execution,
+         simcall->host_execution_set_priority.priority);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_HOST_EXECUTION_WAIT:
-      SIMIX_pre_host_execution_wait(req);
+    case SIMCALL_HOST_EXECUTION_WAIT:
+      SIMIX_pre_host_execution_wait(simcall);
       break;
 
-    case REQ_PROCESS_CREATE:
+    case SIMCALL_PROCESS_CREATE:
       SIMIX_process_create(
-          req->process_create.process,
-         req->process_create.name,
-         req->process_create.code,
-         req->process_create.data,
-         req->process_create.hostname,
-         req->process_create.argc,
-         req->process_create.argv,
-         req->process_create.properties);
-      SIMIX_request_answer(req);
+          simcall->process_create.process,
+         simcall->process_create.name,
+         simcall->process_create.code,
+         simcall->process_create.data,
+         simcall->process_create.hostname,
+         simcall->process_create.argc,
+         simcall->process_create.argv,
+         simcall->process_create.properties);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_KILL:
-      SIMIX_process_kill(req->process_kill.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_KILL:
+      SIMIX_process_kill(simcall->process_kill.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_KILLALL:
-      SIMIX_process_killall(req->issuer);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_KILLALL:
+      SIMIX_process_killall(simcall->issuer);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_CLEANUP:
-      SIMIX_process_cleanup(req->process_cleanup.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_CLEANUP:
+      SIMIX_process_cleanup(simcall->process_cleanup.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_CHANGE_HOST:
+    case SIMCALL_PROCESS_CHANGE_HOST:
       SIMIX_pre_process_change_host(
-         req->process_change_host.process,
-         req->process_change_host.dest);
-      SIMIX_request_answer(req);
+         simcall->process_change_host.process,
+         simcall->process_change_host.dest);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_SUSPEND:
-      SIMIX_pre_process_suspend(req);
+    case SIMCALL_PROCESS_SUSPEND:
+      SIMIX_pre_process_suspend(simcall);
       break;
 
-    case REQ_PROCESS_RESUME:
-      SIMIX_process_resume(req->process_resume.process, req->issuer);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_RESUME:
+      SIMIX_process_resume(simcall->process_resume.process, simcall->issuer);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_COUNT:
-      req->process_count.result = SIMIX_process_count();
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_COUNT:
+      simcall->process_count.result = SIMIX_process_count();
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_GET_DATA:
-      req->process_get_data.result =
-        SIMIX_process_get_data(req->process_get_data.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_GET_DATA:
+      simcall->process_get_data.result =
+        SIMIX_process_get_data(simcall->process_get_data.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_SET_DATA:
+    case SIMCALL_PROCESS_SET_DATA:
       SIMIX_process_set_data(
-         req->process_set_data.process,
-         req->process_set_data.data);
-      SIMIX_request_answer(req);
+         simcall->process_set_data.process,
+         simcall->process_set_data.data);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_GET_HOST:
-      req->process_get_host.result = SIMIX_process_get_host(req->process_get_host.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_GET_HOST:
+      simcall->process_get_host.result = SIMIX_process_get_host(simcall->process_get_host.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_GET_NAME:
-      req->process_get_name.result = SIMIX_process_get_name(req->process_get_name.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_GET_NAME:
+      simcall->process_get_name.result = SIMIX_process_get_name(simcall->process_get_name.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_IS_SUSPENDED:
-      req->process_is_suspended.result =
-        SIMIX_process_is_suspended(req->process_is_suspended.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_IS_SUSPENDED:
+      simcall->process_is_suspended.result =
+        SIMIX_process_is_suspended(simcall->process_is_suspended.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_GET_PROPERTIES:
-      req->process_get_properties.result =
-        SIMIX_process_get_properties(req->process_get_properties.process);
-      SIMIX_request_answer(req);
+    case SIMCALL_PROCESS_GET_PROPERTIES:
+      simcall->process_get_properties.result =
+        SIMIX_process_get_properties(simcall->process_get_properties.process);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_PROCESS_SLEEP:
-      SIMIX_pre_process_sleep(req);
+    case SIMCALL_PROCESS_SLEEP:
+      SIMIX_pre_process_sleep(simcall);
       break;
 
 #ifdef HAVE_TRACING
-    case REQ_SET_CATEGORY:
+    case SIMCALL_SET_CATEGORY:
       SIMIX_set_category(
-          req->set_category.action,
-          req->set_category.category);
-      SIMIX_request_answer(req);
+          simcall->set_category.action,
+          simcall->set_category.category);
+      SIMIX_simcall_answer(simcall);
       break;
 #endif
 
-    case REQ_MUTEX_INIT:
-      req->mutex_init.result = SIMIX_mutex_init();
-      SIMIX_request_answer(req);
+    case SIMCALL_MUTEX_INIT:
+      simcall->mutex_init.result = SIMIX_mutex_init();
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_MUTEX_DESTROY:
-      SIMIX_mutex_destroy(req->mutex_destroy.mutex);
-      SIMIX_request_answer(req);
+    case SIMCALL_MUTEX_DESTROY:
+      SIMIX_mutex_destroy(simcall->mutex_destroy.mutex);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_MUTEX_LOCK:
-      SIMIX_pre_mutex_lock(req);
+    case SIMCALL_MUTEX_LOCK:
+      SIMIX_pre_mutex_lock(simcall);
       break;
 
-    case REQ_MUTEX_TRYLOCK:
-      req->mutex_trylock.result =
-             SIMIX_mutex_trylock(req->mutex_trylock.mutex, req->issuer);
-      SIMIX_request_answer(req);
+    case SIMCALL_MUTEX_TRYLOCK:
+      simcall->mutex_trylock.result =
+             SIMIX_mutex_trylock(simcall->mutex_trylock.mutex, simcall->issuer);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_MUTEX_UNLOCK:
-      SIMIX_mutex_unlock(req->mutex_unlock.mutex, req->issuer);
-      SIMIX_request_answer(req);
+    case SIMCALL_MUTEX_UNLOCK:
+      SIMIX_mutex_unlock(simcall->mutex_unlock.mutex, simcall->issuer);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COND_INIT:
-      req->cond_init.result = SIMIX_cond_init();
-      SIMIX_request_answer(req);
+    case SIMCALL_COND_INIT:
+      simcall->cond_init.result = SIMIX_cond_init();
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COND_DESTROY:
-      SIMIX_cond_destroy(req->cond_destroy.cond);
-      SIMIX_request_answer(req);
+    case SIMCALL_COND_DESTROY:
+      SIMIX_cond_destroy(simcall->cond_destroy.cond);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COND_SIGNAL:
-      SIMIX_cond_signal(req->cond_signal.cond);
-      SIMIX_request_answer(req);
+    case SIMCALL_COND_SIGNAL:
+      SIMIX_cond_signal(simcall->cond_signal.cond);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_COND_WAIT:
-      SIMIX_pre_cond_wait(req);
+    case SIMCALL_COND_WAIT:
+      SIMIX_pre_cond_wait(simcall);
       break;
 
-    case REQ_COND_WAIT_TIMEOUT:
-      SIMIX_pre_cond_wait_timeout(req);
+    case SIMCALL_COND_WAIT_TIMEOUT:
+      SIMIX_pre_cond_wait_timeout(simcall);
       break;
 
-    case REQ_COND_BROADCAST:
-      SIMIX_cond_broadcast(req->cond_broadcast.cond);
-      SIMIX_request_answer(req);
+    case SIMCALL_COND_BROADCAST:
+      SIMIX_cond_broadcast(simcall->cond_broadcast.cond);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_SEM_INIT:
-      req->sem_init.result = SIMIX_sem_init(req->sem_init.capacity);
-      SIMIX_request_answer(req);
+    case SIMCALL_SEM_INIT:
+      simcall->sem_init.result = SIMIX_sem_init(simcall->sem_init.capacity);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_SEM_DESTROY:
-      SIMIX_sem_destroy(req->sem_destroy.sem);
-      SIMIX_request_answer(req);
+    case SIMCALL_SEM_DESTROY:
+      SIMIX_sem_destroy(simcall->sem_destroy.sem);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_SEM_RELEASE:
-      SIMIX_sem_release(req->sem_release.sem);
-      SIMIX_request_answer(req);
+    case SIMCALL_SEM_RELEASE:
+      SIMIX_sem_release(simcall->sem_release.sem);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_SEM_WOULD_BLOCK:
-      req->sem_would_block.result =
-       SIMIX_sem_would_block(req->sem_would_block.sem);
-      SIMIX_request_answer(req);
+    case SIMCALL_SEM_WOULD_BLOCK:
+      simcall->sem_would_block.result =
+       SIMIX_sem_would_block(simcall->sem_would_block.sem);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_SEM_ACQUIRE:
-      SIMIX_pre_sem_acquire(req);
+    case SIMCALL_SEM_ACQUIRE:
+      SIMIX_pre_sem_acquire(simcall);
       break;
 
-    case REQ_SEM_ACQUIRE_TIMEOUT:
-      SIMIX_pre_sem_acquire_timeout(req);
+    case SIMCALL_SEM_ACQUIRE_TIMEOUT:
+      SIMIX_pre_sem_acquire_timeout(simcall);
       break;
 
-    case REQ_SEM_GET_CAPACITY:
-      req->sem_get_capacity.result = 
-        SIMIX_sem_get_capacity(req->sem_get_capacity.sem);
-      SIMIX_request_answer(req);
+    case SIMCALL_SEM_GET_CAPACITY:
+      simcall->sem_get_capacity.result = 
+        SIMIX_sem_get_capacity(simcall->sem_get_capacity.sem);
+      SIMIX_simcall_answer(simcall);
       break;
 
-    case REQ_FILE_READ:
-      SIMIX_pre_file_read(req);
+    case SIMCALL_FILE_READ:
+      SIMIX_pre_file_read(simcall);
       break;
 
-    case REQ_NO_REQ:
+    case SIMCALL_NONE:
       THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
-          SIMIX_process_get_name(req->issuer),
-          SIMIX_host_get_name(SIMIX_process_get_host(req->issuer))
+          SIMIX_process_get_name(simcall->issuer),
+          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
           );
       break;
-
   }
 }
 
-void SIMIX_request_post(smx_action_t action)
+void SIMIX_simcall_post(smx_action_t action)
 {
   switch (action->type) {
 
index b8431a4..b8ab301 100644 (file)
 #ifndef _SIMIX_SMURF_PRIVATE_H
 #define _SIMIX_SMURF_PRIVATE_H
 
-/********************************* Requests ***********************************/
-
-/* we want to build the e_smx_t enumeration and the table of the corresponding
- * strings automatically, using macros */
-
-#define SIMIX_REQ_LIST1 \
-SIMIX_REQ_ENUM_ELEMENT(REQ_NO_REQ),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_BY_NAME),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_NAME),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_PROPERTIES),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_SPEED),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_AVAILABLE_SPEED),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_STATE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_GET_DATA),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_SET_DATA),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_PARALLEL_EXECUTE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTION_DESTROY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTION_CANCEL),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTION_GET_REMAINS),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTION_GET_STATE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTION_SET_PRIORITY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_HOST_EXECUTION_WAIT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_CREATE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_KILL),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_KILLALL),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_CLEANUP),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_CHANGE_HOST),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_SUSPEND),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_RESUME),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_COUNT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_GET_DATA),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_SET_DATA),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_GET_HOST),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_GET_NAME),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_IS_SUSPENDED),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_GET_PROPERTIES),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_PROCESS_SLEEP),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_RDV_CREATE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_RDV_DESTROY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_RDV_GEY_BY_NAME),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_RDV_COMM_COUNT_BY_HOST),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_RDV_GET_HEAD),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_SEND),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_ISEND),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_RECV),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_IRECV),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_DESTROY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_CANCEL),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_WAITANY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_WAIT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_TEST),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_TESTANY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_GET_REMAINS),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_GET_STATE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_GET_SRC_DATA),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_GET_DST_DATA),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_GET_SRC_PROC),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_GET_DST_PROC),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_MUTEX_INIT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_MUTEX_DESTROY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_MUTEX_LOCK),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_MUTEX_TRYLOCK),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_MUTEX_UNLOCK),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COND_INIT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COND_DESTROY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COND_SIGNAL),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COND_WAIT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COND_WAIT_TIMEOUT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_COND_BROADCAST),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_INIT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_DESTROY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_RELEASE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_WOULD_BLOCK),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_ACQUIRE),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_ACQUIRE_TIMEOUT),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_SEM_GET_CAPACITY),\
-SIMIX_REQ_ENUM_ELEMENT(REQ_FILE_READ)
-
-/* REQ_COMM_IS_LATENCY_BOUNDED and REQ_SET_CATEGORY make things complicated
+/********************************* Simcalls *********************************/
+
+/* we want to build the e_smx_simcall_t enumeration and the table of the
+ * corresponding strings automatically, using macros */
+
+#define SIMCALL_LIST1 \
+SIMCALL_ENUM_ELEMENT(SIMCALL_NONE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_BY_NAME),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_NAME),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_PROPERTIES),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_SPEED),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_AVAILABLE_SPEED),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_STATE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_GET_DATA),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_SET_DATA),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_PARALLEL_EXECUTE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_DESTROY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_CANCEL),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_GET_REMAINS),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_GET_STATE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_SET_PRIORITY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_HOST_EXECUTION_WAIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_CREATE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_KILL),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_KILLALL),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_CLEANUP),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_CHANGE_HOST),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SUSPEND),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_RESUME),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_COUNT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_DATA),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SET_DATA),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_HOST),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_NAME),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_IS_SUSPENDED),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_PROPERTIES),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SLEEP),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_CREATE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_DESTROY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GEY_BY_NAME),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_COMM_COUNT_BY_HOST),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GET_HEAD),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_SEND),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_ISEND),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_RECV),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_IRECV),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_DESTROY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_CANCEL),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_WAITANY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_WAIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_TEST),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_TESTANY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_REMAINS),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_STATE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_SRC_DATA),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_DST_DATA),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_SRC_PROC),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_DST_PROC),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_INIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_DESTROY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_LOCK),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_TRYLOCK),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_MUTEX_UNLOCK),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COND_INIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COND_DESTROY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COND_SIGNAL),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COND_WAIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COND_WAIT_TIMEOUT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_COND_BROADCAST),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_INIT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_DESTROY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_RELEASE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_WOULD_BLOCK),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_ACQUIRE),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_ACQUIRE_TIMEOUT),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_SEM_GET_CAPACITY),\
+SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_READ)
+
+/* SIMCALL_COMM_IS_LATENCY_BOUNDED and SIMCALL_SET_CATEGORY make things complicated
  * because they are not always present */
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-#define SIMIX_REQ_LIST2 \
-,SIMIX_REQ_ENUM_ELEMENT(REQ_COMM_IS_LATENCY_BOUNDED)
+#define SIMCALL_LIST2 \
+,SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_IS_LATENCY_BOUNDED)
 #else
-#define SIMIX_REQ_LIST2
+#define SIMCALL_LIST2
 #endif
 
 #ifdef HAVE_TRACING
-#define SIMIX_REQ_LIST3 \
-,SIMIX_REQ_ENUM_ELEMENT(REQ_SET_CATEGORY)
+#define SIMCALL_LIST3 \
+,SIMCALL_ENUM_ELEMENT(SIMCALL_SET_CATEGORY)
 #else
-#define SIMIX_REQ_LIST3
+#define SIMCALL_LIST3
 #endif
 
-/* SIMIX_REQ_LIST is the final macro to use */
-#define SIMIX_REQ_LIST SIMIX_REQ_LIST1 SIMIX_REQ_LIST2 SIMIX_REQ_LIST3
+/* SIMCALL_LIST is the final macro to use */
+#define SIMCALL_LIST SIMCALL_LIST1 SIMCALL_LIST2 SIMCALL_LIST3
 
 /* you can redefine the following macro differently to generate something else
  * with the list of enumeration values (e.g. a table of strings or a table of function pointers) */
-#define SIMIX_REQ_ENUM_ELEMENT(x) x
+#define SIMCALL_ENUM_ELEMENT(x) x
 
 /**
- * \brief All possible SIMIX requests.
+ * \brief All possible simcalls.
  */
 typedef enum {
-SIMIX_REQ_LIST
-} e_smx_req_t;
+SIMCALL_LIST
+} e_smx_simcall_t;
 
 /**
- * \brief Represents a SIMIX request.
+ * \brief Represents a simcall to the kernel.
  */
-typedef struct s_smx_req {
-  e_smx_req_t call;
+typedef struct s_smx_simcall {
+  e_smx_simcall_t call;
   smx_process_t issuer;
 
   union {
@@ -506,15 +506,16 @@ typedef struct s_smx_req {
       char* name;;
     } file_read;
   };
-} s_smx_req_t, *smx_req_t;
+} s_smx_simcall_t, *smx_simcall_t;
 
 /******************************** General *************************************/
 
-void SIMIX_request_push(smx_process_t self);
-void SIMIX_request_answer(smx_req_t);
-void SIMIX_request_pre(smx_req_t, int);
-void SIMIX_request_post(smx_action_t);
-XBT_INLINE smx_req_t SIMIX_req_mine(void);
+void SIMIX_simcall_push(smx_process_t self);
+void SIMIX_simcall_answer(smx_simcall_t);
+void SIMIX_simcall_pre(smx_simcall_t, int);
+void SIMIX_simcall_post(smx_action_t);
+XBT_INLINE smx_simcall_t SIMIX_simcall_mine(void);
+const char *SIMIX_simcall_name(e_smx_simcall_t kind);
 
 #endif
 
index 3b931cd..e85bfe3 100644 (file)
@@ -14,9 +14,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix,
 static smx_action_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout);
 static void SIMIX_synchro_finish(smx_action_t action);
 static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
-                             smx_process_t issuer, smx_req_t req);
+                             smx_process_t issuer, smx_simcall_t simcall);
 static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
-                            smx_req_t req);
+                            smx_simcall_t simcall);
 
 /***************************** Synchro action *********************************/
 
@@ -35,29 +35,29 @@ static smx_action_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout)
   return action;
 }
 
-void SIMIX_synchro_stop_waiting(smx_process_t process, smx_req_t req)
+void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall)
 {
-  XBT_IN("(%p, %p)",process,req);
-  switch (req->call) {
+  XBT_IN("(%p, %p)",process,simcall);
+  switch (simcall->call) {
 
-    case REQ_MUTEX_LOCK:
-      xbt_swag_remove(process, req->mutex_lock.mutex->sleeping);
+    case SIMCALL_MUTEX_LOCK:
+      xbt_swag_remove(process, simcall->mutex_lock.mutex->sleeping);
       break;
 
-    case REQ_COND_WAIT:
-      xbt_swag_remove(process, req->cond_wait.cond->sleeping);
+    case SIMCALL_COND_WAIT:
+      xbt_swag_remove(process, simcall->cond_wait.cond->sleeping);
       break;
 
-    case REQ_COND_WAIT_TIMEOUT:
-      xbt_swag_remove(process, req->cond_wait_timeout.cond->sleeping);
+    case SIMCALL_COND_WAIT_TIMEOUT:
+      xbt_swag_remove(process, simcall->cond_wait_timeout.cond->sleeping);
       break;
 
-    case REQ_SEM_ACQUIRE:
-      xbt_swag_remove(process, req->sem_acquire.sem->sleeping);
+    case SIMCALL_SEM_ACQUIRE:
+      xbt_swag_remove(process, simcall->sem_acquire.sem->sleeping);
       break;
 
-    case REQ_SEM_ACQUIRE_TIMEOUT:
-      xbt_swag_remove(process, req->sem_acquire_timeout.sem->sleeping);
+    case SIMCALL_SEM_ACQUIRE_TIMEOUT:
+      xbt_swag_remove(process, simcall->sem_acquire_timeout.sem->sleeping);
       break;
 
     default:
@@ -91,7 +91,7 @@ void SIMIX_post_synchro(smx_action_t action)
 static void SIMIX_synchro_finish(smx_action_t action)
 {
   XBT_IN("(%p)",action);
-  smx_req_t req = xbt_fifo_shift(action->request_list);
+  smx_simcall_t simcall = xbt_fifo_shift(action->simcalls);
 
   switch (action->state) {
 
@@ -99,8 +99,8 @@ static void SIMIX_synchro_finish(smx_action_t action)
       TRY {
         THROWF(timeout_error, 0, "Synchro's wait timeout");
       }
-      CATCH(req->issuer->running_ctx->exception) {
-        req->issuer->doexception = 1;
+      CATCH(simcall->issuer->running_ctx->exception) {
+        simcall->issuer->doexception = 1;
       }
       break;
 
@@ -108,8 +108,8 @@ static void SIMIX_synchro_finish(smx_action_t action)
       TRY {
         THROWF(host_error, 0, "Host failed");
       }
-      CATCH(req->issuer->running_ctx->exception) {
-        req->issuer->doexception = 1;
+      CATCH(simcall->issuer->running_ctx->exception) {
+        simcall->issuer->doexception = 1;
       }
       break;
 
@@ -118,9 +118,9 @@ static void SIMIX_synchro_finish(smx_action_t action)
       break;
   }
 
-  SIMIX_synchro_stop_waiting(req->issuer, req);
+  SIMIX_synchro_stop_waiting(simcall->issuer, simcall);
   SIMIX_synchro_destroy(action);
-  SIMIX_request_answer(req);
+  SIMIX_simcall_answer(simcall);
   XBT_OUT();
 }
 /*********************************** Mutex ************************************/
@@ -144,29 +144,29 @@ smx_mutex_t SIMIX_mutex_init(void)
 }
 
 /**
- * \brief Handle mutex lock request
- * \param req The request
+ * \brief Handles a mutex lock simcall.
+ * \param simcall the simcall
  */
-void SIMIX_pre_mutex_lock(smx_req_t req)
+void SIMIX_pre_mutex_lock(smx_simcall_t simcall)
 {
-  XBT_IN("(%p)",req);
+  XBT_IN("(%p)",simcall);
   /* FIXME: check where to validate the arguments */
   smx_action_t sync_act = NULL;
-  smx_mutex_t mutex = req->mutex_lock.mutex;
-  smx_process_t process = req->issuer;
+  smx_mutex_t mutex = simcall->mutex_lock.mutex;
+  smx_process_t process = simcall->issuer;
 
   if (mutex->locked) {
     /* FIXME: check if the host is active ? */
     /* Somebody using the mutex, use a synchro action to get host failures */
     sync_act = SIMIX_synchro_wait(process->smx_host, -1);
-    xbt_fifo_push(sync_act->request_list, req);
-    req->issuer->waiting_action = sync_act;
-    xbt_swag_insert(req->issuer, mutex->sleeping);   
+    xbt_fifo_push(sync_act->simcalls, simcall);
+    simcall->issuer->waiting_action = sync_act;
+    xbt_swag_insert(simcall->issuer, mutex->sleeping);   
   } else {
     /* mutex free */
     mutex->locked = 1;
-    mutex->owner = req->issuer;
-    SIMIX_request_answer(req);
+    mutex->owner = simcall->issuer;
+    SIMIX_simcall_answer(simcall);
   }
   XBT_OUT();
 }
@@ -219,7 +219,7 @@ void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer)
     SIMIX_synchro_destroy(p->waiting_action);
     p->waiting_action = NULL;
     mutex->owner = p;
-    SIMIX_request_answer(&p->request);
+    SIMIX_simcall_answer(&p->simcall);
   } else {
     /* nobody to wake up */
     mutex->locked = 0;
@@ -265,41 +265,41 @@ smx_cond_t SIMIX_cond_init()
 }
 
 /**
- * \brief Handle condition waiting requests without timeouts
- * \param The request
+ * \brief Handle a condition waiting simcall without timeouts
+ * \param simcall the simcall
  */
-void SIMIX_pre_cond_wait(smx_req_t req)
+void SIMIX_pre_cond_wait(smx_simcall_t simcall)
 {
-  XBT_IN("(%p)",req);
-  smx_process_t issuer = req->issuer;
-  smx_cond_t cond = req->cond_wait.cond;
-  smx_mutex_t mutex = req->cond_wait.mutex;
+  XBT_IN("(%p)",simcall);
+  smx_process_t issuer = simcall->issuer;
+  smx_cond_t cond = simcall->cond_wait.cond;
+  smx_mutex_t mutex = simcall->cond_wait.mutex;
 
-  _SIMIX_cond_wait(cond, mutex, -1, issuer, req);
+  _SIMIX_cond_wait(cond, mutex, -1, issuer, simcall);
   XBT_OUT();
 }
 
 /**
- * \brief Handle condition waiting requests with timeouts
- * \param The request
+ * \brief Handle a condition waiting simcall with timeouts
+ * \param simcall the simcall
  */
-void SIMIX_pre_cond_wait_timeout(smx_req_t req)
+void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall)
 {
-  XBT_IN("(%p)",req);
-  smx_process_t issuer = req->issuer;
-  smx_cond_t cond = req->cond_wait_timeout.cond;
-  smx_mutex_t mutex = req->cond_wait_timeout.mutex;
-  double timeout = req->cond_wait_timeout.timeout;
+  XBT_IN("(%p)",simcall);
+  smx_process_t issuer = simcall->issuer;
+  smx_cond_t cond = simcall->cond_wait_timeout.cond;
+  smx_mutex_t mutex = simcall->cond_wait_timeout.mutex;
+  double timeout = simcall->cond_wait_timeout.timeout;
 
-  _SIMIX_cond_wait(cond, mutex, timeout, issuer, req);
+  _SIMIX_cond_wait(cond, mutex, timeout, issuer, simcall);
   XBT_OUT();
 }
 
 
 static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
-                             smx_process_t issuer, smx_req_t req)
+                             smx_process_t issuer, smx_simcall_t simcall)
 {
-  XBT_IN("(%p, %p, %f, %p,%p)",cond,mutex,timeout,issuer,req);
+  XBT_IN("(%p, %p, %f, %p,%p)",cond,mutex,timeout,issuer,simcall);
   smx_action_t sync_act = NULL;
 
   XBT_DEBUG("Wait condition %p", cond);
@@ -312,9 +312,9 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
   }
 
   sync_act = SIMIX_synchro_wait(issuer->smx_host, timeout);
-  xbt_fifo_unshift(sync_act->request_list, req);
+  xbt_fifo_unshift(sync_act->simcalls, simcall);
   issuer->waiting_action = sync_act;
-  xbt_swag_insert(req->issuer, cond->sleeping);   
+  xbt_swag_insert(simcall->issuer, cond->sleeping);   
   XBT_OUT();
 }
 
@@ -330,7 +330,7 @@ void SIMIX_cond_signal(smx_cond_t cond)
   XBT_IN("(%p)",cond);
   smx_process_t proc = NULL;
   smx_mutex_t mutex = NULL;
-  smx_req_t req = NULL;
+  smx_simcall_t simcall = NULL;
 
   XBT_DEBUG("Signal condition %p", cond);
 
@@ -342,17 +342,17 @@ void SIMIX_cond_signal(smx_cond_t cond)
     SIMIX_synchro_destroy(proc->waiting_action);
     proc->waiting_action = NULL;
 
-    /* Now transform the cond wait request into a mutex lock one */
-    req = &proc->request;
-    if(req->call == REQ_COND_WAIT)
-      mutex = req->cond_wait.mutex;
+    /* Now transform the cond wait simcall into a mutex lock one */
+    simcall = &proc->simcall;
+    if(simcall->call == SIMCALL_COND_WAIT)
+      mutex = simcall->cond_wait.mutex;
     else
-      mutex = req->cond_wait_timeout.mutex;
+      mutex = simcall->cond_wait_timeout.mutex;
 
-    req->call = REQ_MUTEX_LOCK;
-    req->mutex_lock.mutex = mutex;
+    simcall->call = SIMCALL_MUTEX_LOCK;
+    simcall->mutex_lock.mutex = mutex;
 
-    SIMIX_pre_mutex_lock(req);
+    SIMIX_pre_mutex_lock(simcall);
   }
   XBT_OUT();
 }
@@ -441,7 +441,7 @@ void SIMIX_sem_release(smx_sem_t sem)
     proc = xbt_swag_extract(sem->sleeping);
     SIMIX_synchro_destroy(proc->waiting_action);
     proc->waiting_action = NULL;
-    SIMIX_request_answer(&proc->request);
+    SIMIX_simcall_answer(&proc->simcall);
   } else if (sem->value < SMX_SEM_NOLIMIT) {
     sem->value++;
   }
@@ -465,41 +465,43 @@ int SIMIX_sem_get_capacity(smx_sem_t sem)
 }
 
 static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
-                            smx_req_t req)
+                            smx_simcall_t simcall)
 {
-  XBT_IN("(%p, %f, %p, %p)",sem,timeout,issuer,req);
+  XBT_IN("(%p, %f, %p, %p)",sem,timeout,issuer,simcall);
   smx_action_t sync_act = NULL;
 
   XBT_DEBUG("Wait semaphore %p (timeout:%f)", sem, timeout);
   if (sem->value <= 0) {
     sync_act = SIMIX_synchro_wait(issuer->smx_host, timeout);
-    xbt_fifo_unshift(sync_act->request_list, req);
+    xbt_fifo_unshift(sync_act->simcalls, simcall);
     issuer->waiting_action = sync_act;
     xbt_swag_insert(issuer, sem->sleeping);
   } else {
     sem->value--;
-    SIMIX_request_answer(req);
+    SIMIX_simcall_answer(simcall);
   }
   XBT_OUT();
 }
 
 /**
- * \brief Handle sem acquire requests without timeouts
+ * \brief Handles a sem acquire simcall without timeout.
+ * \param simcall the simcall
  */
-void SIMIX_pre_sem_acquire(smx_req_t req)
+void SIMIX_pre_sem_acquire(smx_simcall_t simcall)
 {
-  XBT_IN("(%p)",req);
-  _SIMIX_sem_wait(req->sem_acquire.sem, -1, req->issuer, req);
+  XBT_IN("(%p)",simcall);
+  _SIMIX_sem_wait(simcall->sem_acquire.sem, -1, simcall->issuer, simcall);
   XBT_OUT();
 }
 
 /**
- * \brief Handle sem acquire requests with timeouts
+ * \brief Handles a sem acquire simcall with timeout.
+ * \param simcall the simcall
  */
-void SIMIX_pre_sem_acquire_timeout(smx_req_t req)
+void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall)
 {
-  XBT_IN("(%p)",req);
-  _SIMIX_sem_wait(req->sem_acquire_timeout.sem,
-                  req->sem_acquire_timeout.timeout, req->issuer, req);  
+  XBT_IN("(%p)",simcall);
+  _SIMIX_sem_wait(simcall->sem_acquire_timeout.sem,
+                  simcall->sem_acquire_timeout.timeout, simcall->issuer, simcall);  
   XBT_OUT();
 }
index a820073..f3ec15c 100644 (file)
@@ -21,28 +21,28 @@ typedef struct s_smx_sem {
 } s_smx_sem_t;
 
 void SIMIX_post_synchro(smx_action_t action);
-void SIMIX_synchro_stop_waiting(smx_process_t process, smx_req_t req);
+void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall);
 void SIMIX_synchro_destroy(smx_action_t action);
 
 smx_mutex_t SIMIX_mutex_init(void);
 void SIMIX_mutex_destroy(smx_mutex_t mutex);
-void SIMIX_pre_mutex_lock(smx_req_t req);
+void SIMIX_pre_mutex_lock(smx_simcall_t simcall);
 int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer);
 void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer);
 
 smx_cond_t SIMIX_cond_init(void);
 void SIMIX_cond_destroy(smx_cond_t cond);
 void SIMIX_cond_signal(smx_cond_t cond);
-void SIMIX_pre_cond_wait(smx_req_t req);
-void SIMIX_pre_cond_wait_timeout(smx_req_t req);
+void SIMIX_pre_cond_wait(smx_simcall_t simcall);
+void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall);
 void SIMIX_cond_broadcast(smx_cond_t cond);
 
 smx_sem_t SIMIX_sem_init(unsigned int value);
 void SIMIX_sem_destroy(smx_sem_t sem);
 void SIMIX_sem_release(smx_sem_t sem);
 int SIMIX_sem_would_block(smx_sem_t sem);
-void SIMIX_pre_sem_acquire(smx_req_t req);
-void SIMIX_pre_sem_acquire_timeout(smx_req_t req);
+void SIMIX_pre_sem_acquire(smx_simcall_t simcall);
+void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall);
 int SIMIX_sem_get_capacity(smx_sem_t sem);
 
 #endif
index f84bd36..6c8825e 100644 (file)
 #include "smx_private.h"
 #include "mc/mc.h"
 
-
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
-static const char* request_names[] = {
-#undef SIMIX_REQ_ENUM_ELEMENT
-#define SIMIX_REQ_ENUM_ELEMENT(x) #x /* generate strings from the enumeration values */
-SIMIX_REQ_LIST
-#undef SIMIX_REQ_ENUM_ELEMENT
+static const char* simcall_names[] = {
+#undef SIMCALL_ENUM_ELEMENT
+#define SIMCALL_ENUM_ELEMENT(x) #x /* generate strings from the enumeration values */
+SIMCALL_LIST
+#undef SIMCALL_ENUM_ELEMENT
 };
 
 /**
@@ -34,14 +33,14 @@ SIMIX_REQ_LIST
  * \param name The name of the host to get
  * \return The corresponding host
  */
-smx_host_t SIMIX_req_host_get_by_name(const char *name)
+smx_host_t simcall_host_get_by_name(const char *name)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_BY_NAME;
-  req->host_get_by_name.name = name;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_by_name.result;
+  simcall->call = SIMCALL_HOST_GET_BY_NAME;
+  simcall->host_get_by_name.name = name;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_by_name.result;
 }
 
 /**
@@ -50,14 +49,14 @@ smx_host_t SIMIX_req_host_get_by_name(const char *name)
  * \param host A SIMIX host
  * \return The name of this host
  */
-const char* SIMIX_req_host_get_name(smx_host_t host)
+const char* simcall_host_get_name(smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_NAME;
-  req->host_get_name.host = host;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_name.result;
+  simcall->call = SIMCALL_HOST_GET_NAME;
+  simcall->host_get_name.host = host;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_name.result;
 }
 
 /**
@@ -66,14 +65,14 @@ const char* SIMIX_req_host_get_name(smx_host_t host)
  * \param host A host
  * \return The properties of this host
  */
-xbt_dict_t SIMIX_req_host_get_properties(smx_host_t host)
+xbt_dict_t simcall_host_get_properties(smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_PROPERTIES;
-  req->host_get_properties.host = host;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_properties.result;
+  simcall->call = SIMCALL_HOST_GET_PROPERTIES;
+  simcall->host_get_properties.host = host;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_properties.result;
 }
 
 /**
@@ -83,14 +82,14 @@ xbt_dict_t SIMIX_req_host_get_properties(smx_host_t host)
  * \param host A SIMIX host
  * \return The speed of this host (in Mflop/s)
  */
-double SIMIX_req_host_get_speed(smx_host_t host)
+double simcall_host_get_speed(smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_SPEED;
-  req->host_get_speed.host = host;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_speed.result;
+  simcall->call = SIMCALL_HOST_GET_SPEED;
+  simcall->host_get_speed.host = host;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_speed.result;
 }
 
 /**
@@ -98,14 +97,14 @@ double SIMIX_req_host_get_speed(smx_host_t host)
  *
  * \return Speed currently available (in Mflop/s)
  */
-double SIMIX_req_host_get_available_speed(smx_host_t host)
+double simcall_host_get_available_speed(smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_AVAILABLE_SPEED;
-  req->host_get_available_speed.host = host;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_available_speed.result;
+  simcall->call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
+  simcall->host_get_available_speed.host = host;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_available_speed.result;
 }
 
 /**
@@ -115,14 +114,14 @@ double SIMIX_req_host_get_available_speed(smx_host_t host)
  * \param host A SIMIX host
  * \return 1 if the host is available, 0 otherwise
  */
-int SIMIX_req_host_get_state(smx_host_t host)
+int simcall_host_get_state(smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_STATE;
-  req->host_get_state.host = host;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_state.result;
+  simcall->call = SIMCALL_HOST_GET_STATE;
+  simcall->host_get_state.host = host;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_state.result;
 }
 
 /**
@@ -131,14 +130,14 @@ int SIMIX_req_host_get_state(smx_host_t host)
  * \param host SIMIX host
  * \return the user data of this host
  */
-void* SIMIX_req_host_get_data(smx_host_t host)
+void* simcall_host_get_data(smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_GET_DATA;
-  req->host_get_data.host = host;
-  SIMIX_request_push(req->issuer);
-  return req->host_get_data.result;
+  simcall->call = SIMCALL_HOST_GET_DATA;
+  simcall->host_get_data.host = host;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_get_data.result;
 }
 
 /**
@@ -148,14 +147,14 @@ void* SIMIX_req_host_get_data(smx_host_t host)
  * \param A host SIMIX host
  * \param data The user data to set
  */
-void SIMIX_req_host_set_data(smx_host_t host, void *data)
+void simcall_host_set_data(smx_host_t host, void *data)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_SET_DATA;
-  req->host_set_data.host = host;
-  req->host_set_data.data = data;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_HOST_SET_DATA;
+  simcall->host_set_data.host = host;
+  simcall->host_set_data.data = data;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /** \brief Creates an action that executes some computation of an host.
@@ -168,7 +167,7 @@ void SIMIX_req_host_set_data(smx_host_t host, void *data)
  * \param amount Computation amount (in bytes)
  * \return A new SIMIX execution action
  */
-smx_action_t SIMIX_req_host_execute(const char *name, smx_host_t host,
+smx_action_t simcall_host_execute(const char *name, smx_host_t host,
                                     double computation_amount,
                                     double priority)
 {
@@ -176,15 +175,15 @@ smx_action_t SIMIX_req_host_execute(const char *name, smx_host_t host,
   xbt_assert(isfinite(computation_amount), "computation_amount is not finite!");
   xbt_assert(isfinite(priority), "priority is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTE;
-  req->host_execute.name = name;
-  req->host_execute.host = host;
-  req->host_execute.computation_amount = computation_amount;
-  req->host_execute.priority = priority;
-  SIMIX_request_push(req->issuer);
-  return req->host_execute.result;
+  simcall->call = SIMCALL_HOST_EXECUTE;
+  simcall->host_execute.name = name;
+  simcall->host_execute.host = host;
+  simcall->host_execute.computation_amount = computation_amount;
+  simcall->host_execute.priority = priority;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_execute.result;
 }
 
 /** \brief Creates an action that may involve parallel computation on
@@ -200,7 +199,7 @@ smx_action_t SIMIX_req_host_execute(const char *name, smx_host_t host,
  * \param rate the SURF action rate
  * \return A new SIMIX execution action
  */
-smx_action_t SIMIX_req_host_parallel_execute(const char *name,
+smx_action_t simcall_host_parallel_execute(const char *name,
                                          int host_nb,
                                          smx_host_t *host_list,
                                          double *computation_amount,
@@ -221,18 +220,18 @@ smx_action_t SIMIX_req_host_parallel_execute(const char *name,
   xbt_assert(isfinite(amount), "amount is not finite!");
   xbt_assert(isfinite(rate), "rate is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_PARALLEL_EXECUTE;
-  req->host_parallel_execute.name = name;
-  req->host_parallel_execute.host_nb = host_nb;
-  req->host_parallel_execute.host_list = host_list;
-  req->host_parallel_execute.computation_amount = computation_amount;
-  req->host_parallel_execute.communication_amount = communication_amount;
-  req->host_parallel_execute.amount = amount;
-  req->host_parallel_execute.rate = rate;
-  SIMIX_request_push(req->issuer);
-  return req->host_parallel_execute.result;
+  simcall->call = SIMCALL_HOST_PARALLEL_EXECUTE;
+  simcall->host_parallel_execute.name = name;
+  simcall->host_parallel_execute.host_nb = host_nb;
+  simcall->host_parallel_execute.host_list = host_list;
+  simcall->host_parallel_execute.computation_amount = computation_amount;
+  simcall->host_parallel_execute.communication_amount = communication_amount;
+  simcall->host_parallel_execute.amount = amount;
+  simcall->host_parallel_execute.rate = rate;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_parallel_execute.result;
 }
 
 /**
@@ -241,13 +240,13 @@ smx_action_t SIMIX_req_host_parallel_execute(const char *name,
  * Destroys an action, freing its memory. This function cannot be called if there are a conditional waiting for it.
  * \param action The execution action to destroy
  */
-void SIMIX_req_host_execution_destroy(smx_action_t execution)
+void simcall_host_execution_destroy(smx_action_t execution)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTION_DESTROY;
-  req->host_execution_destroy.execution = execution;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_HOST_EXECUTION_DESTROY;
+  simcall->host_execution_destroy.execution = execution;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -256,13 +255,13 @@ void SIMIX_req_host_execution_destroy(smx_action_t execution)
  * This functions stops the execution. It calls a surf function.
  * \param action The execution action to cancel
  */
-void SIMIX_req_host_execution_cancel(smx_action_t execution)
+void simcall_host_execution_cancel(smx_action_t execution)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTION_CANCEL;
-  req->host_execution_cancel.execution = execution;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_HOST_EXECUTION_CANCEL;
+  simcall->host_execution_cancel.execution = execution;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -271,14 +270,14 @@ void SIMIX_req_host_execution_cancel(smx_action_t execution)
  * \param Action The execution action
  * \return The remaining amount
  */
-double SIMIX_req_host_execution_get_remains(smx_action_t execution)
+double simcall_host_execution_get_remains(smx_action_t execution)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTION_GET_REMAINS;
-  req->host_execution_get_remains.execution = execution;
-  SIMIX_request_push(req->issuer);
-  return req->host_execution_get_remains.result;
+  simcall->call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
+  simcall->host_execution_get_remains.execution = execution;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_execution_get_remains.result;
 }
 
 /**
@@ -287,14 +286,14 @@ double SIMIX_req_host_execution_get_remains(smx_action_t execution)
  * \param execution The execution action
  * \return The state
  */
-e_smx_state_t SIMIX_req_host_execution_get_state(smx_action_t execution)
+e_smx_state_t simcall_host_execution_get_state(smx_action_t execution)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTION_GET_STATE;
-  req->host_execution_get_state.execution = execution;
-  SIMIX_request_push(req->issuer);
-  return req->host_execution_get_state.result;
+  simcall->call = SIMCALL_HOST_EXECUTION_GET_STATE;
+  simcall->host_execution_get_state.execution = execution;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_execution_get_state.result;
 }
 
 /**
@@ -304,17 +303,17 @@ e_smx_state_t SIMIX_req_host_execution_get_state(smx_action_t execution)
  * \param execution The execution action
  * \param priority The new priority
  */
-void SIMIX_req_host_execution_set_priority(smx_action_t execution, double priority)
+void simcall_host_execution_set_priority(smx_action_t execution, double priority)
 {
   /* checking for infinite values */
   xbt_assert(isfinite(priority), "priority is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTION_SET_PRIORITY;
-  req->host_execution_set_priority.execution = execution;
-  req->host_execution_set_priority.priority = priority;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
+  simcall->host_execution_set_priority.execution = execution;
+  simcall->host_execution_set_priority.priority = priority;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -322,14 +321,14 @@ void SIMIX_req_host_execution_set_priority(smx_action_t execution, double priori
  *
  * \param execution The execution action
  */
-e_smx_state_t SIMIX_req_host_execution_wait(smx_action_t execution)
+e_smx_state_t simcall_host_execution_wait(smx_action_t execution)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_HOST_EXECUTION_WAIT;
-  req->host_execution_wait.execution = execution;
-  SIMIX_request_push(req->issuer);
-  return req->host_execution_wait.result;
+  simcall->call = SIMCALL_HOST_EXECUTION_WAIT;
+  simcall->host_execution_wait.execution = execution;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->host_execution_wait.result;
 }
 
 /**
@@ -341,31 +340,31 @@ e_smx_state_t SIMIX_req_host_execution_wait(smx_action_t execution)
  * \param name a name for the process. It is for user-level information and can be NULL.
  * \param code the main function of the process
  * \param data a pointer to any data one may want to attach to the new object. It is for user-level information and can be NULL.
- * It can be retrieved with the function \ref SIMIX_req_process_get_data.
+ * It can be retrieved with the function \ref simcall_process_get_data.
  * \param hostname name of the host where the new agent is executed.
  * \param argc first argument passed to \a code
  * \param argv second argument passed to \a code
  * \param properties the properties of the process
  */
-void SIMIX_req_process_create(smx_process_t *process, const char *name,
+void simcall_process_create(smx_process_t *process, const char *name,
                               xbt_main_func_t code,
                               void *data,
                               const char *hostname,
                               int argc, char **argv,
                               xbt_dict_t properties)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_CREATE;
-  req->process_create.process = process;
-  req->process_create.name = name;
-  req->process_create.code = code;
-  req->process_create.data = data;
-  req->process_create.hostname = hostname;
-  req->process_create.argc = argc;
-  req->process_create.argv = argv;
-  req->process_create.properties = properties;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_CREATE;
+  simcall->process_create.process = process;
+  simcall->process_create.name = name;
+  simcall->process_create.code = code;
+  simcall->process_create.data = data;
+  simcall->process_create.hostname = hostname;
+  simcall->process_create.argc = argc;
+  simcall->process_create.argv = argv;
+  simcall->process_create.properties = properties;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /** \brief Kills a SIMIX process.
@@ -374,35 +373,35 @@ void SIMIX_req_process_create(smx_process_t *process, const char *name,
  *
  * \param process poor victim
  */
-void SIMIX_req_process_kill(smx_process_t process)
+void simcall_process_kill(smx_process_t process)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_KILL;
-  req->process_kill.process = process;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_KILL;
+  simcall->process_kill.process = process;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /** \brief Kills all SIMIX processes.
  */
-void SIMIX_req_process_killall(void)
+void simcall_process_killall(void)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_KILLALL;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_KILLALL;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /** \brief Cleans up a SIMIX process.
  * \param process poor victim (must have already been killed)
  */
-void SIMIX_req_process_cleanup(smx_process_t process)
+void simcall_process_cleanup(smx_process_t process)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_CLEANUP;
-  req->process_cleanup.process = process;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_CLEANUP;
+  simcall->process_cleanup.process = process;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -414,14 +413,14 @@ void SIMIX_req_process_cleanup(smx_process_t process)
  * \param source name of the previous host
  * \param dest name of the new host
  */
-void SIMIX_req_process_change_host(smx_process_t process, smx_host_t dest)
+void simcall_process_change_host(smx_process_t process, smx_host_t dest)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_CHANGE_HOST;
-  req->process_change_host.process = process;
-  req->process_change_host.dest = dest;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_CHANGE_HOST;
+  simcall->process_change_host.process = process;
+  simcall->process_change_host.dest = dest;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -432,15 +431,15 @@ void SIMIX_req_process_change_host(smx_process_t process, smx_host_t dest)
  *
  * \param process a SIMIX process
  */
-void SIMIX_req_process_suspend(smx_process_t process)
+void simcall_process_suspend(smx_process_t process)
 {
   xbt_assert(process, "Invalid parameters");
 
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_SUSPEND;
-  req->process_suspend.process = process;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_SUSPEND;
+  simcall->process_suspend.process = process;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -451,13 +450,13 @@ void SIMIX_req_process_suspend(smx_process_t process)
  *
  * \param process a SIMIX process
  */
-void SIMIX_req_process_resume(smx_process_t process)
+void simcall_process_resume(smx_process_t process)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_RESUME;
-  req->process_resume.process = process;
-  SIMIX_request_push(req->issuer);
+  simcall->call = SIMCALL_PROCESS_RESUME;
+  simcall->process_resume.process = process;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /**
@@ -465,13 +464,13 @@ void SIMIX_req_process_resume(smx_process_t process)
  *
  * Maestro internal process is not counted, only user code processes are
  */
-int SIMIX_req_process_count(void)
+int simcall_process_count(void)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_COUNT;
-  SIMIX_request_push(req->issuer);
-  return req->process_count.result;
+  simcall->call = SIMCALL_PROCESS_COUNT;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_count.result;
 }
 
 /**
@@ -479,19 +478,19 @@ int SIMIX_req_process_count(void)
  * \param process a SIMIX process
  * \return the user data of this process
  */
-void* SIMIX_req_process_get_data(smx_process_t process)
+void* simcall_process_get_data(smx_process_t process)
 {
   if (process == SIMIX_process_self()) {
-    /* avoid a request if this function is called by the process itself */
+    /* avoid a simcall if this function is called by the process itself */
     return SIMIX_process_get_data(process);
   }
 
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_GET_DATA;
-  req->process_get_data.process = process;
-  SIMIX_request_push(req->issuer);
-  return req->process_get_data.result;
+  simcall->call = SIMCALL_PROCESS_GET_DATA;
+  simcall->process_get_data.process = process;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_get_data.result;
 }
 
 /**
@@ -501,20 +500,20 @@ void* SIMIX_req_process_get_data(smx_process_t process)
  * \param process SIMIX process
  * \param data User data
  */
-void SIMIX_req_process_set_data(smx_process_t process, void *data)
+void simcall_process_set_data(smx_process_t process, void *data)
 {
   if (process == SIMIX_process_self()) {
-    /* avoid a request if this function is called by the process itself */
+    /* avoid a simcall if this function is called by the process itself */
     SIMIX_process_self_set_data(process, data);
   }
   else {
 
-    smx_req_t req = SIMIX_req_mine();
+    smx_simcall_t simcall = SIMIX_simcall_mine();
 
-    req->call = REQ_PROCESS_SET_DATA;
-    req->process_set_data.process = process;
-    req->process_set_data.data = data;
-    SIMIX_request_push(req->issuer);
+    simcall->call = SIMCALL_PROCESS_SET_DATA;
+    simcall->process_set_data.process = process;
+    simcall->process_set_data.data = data;
+    SIMIX_simcall_push(simcall->issuer);
   }
 }
 
@@ -525,14 +524,14 @@ void SIMIX_req_process_set_data(smx_process_t process, void *data)
  * \param process SIMIX process
  * \return SIMIX host
  */
-smx_host_t SIMIX_req_process_get_host(smx_process_t process)
+smx_host_t simcall_process_get_host(smx_process_t process)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_GET_HOST;
-  req->process_get_host.process = process;
-  SIMIX_request_push(req->issuer);
-  return req->process_get_host.result;
+  simcall->call = SIMCALL_PROCESS_GET_HOST;
+  simcall->process_get_host.process = process;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_get_host.result;
 }
 
 /**
@@ -542,19 +541,19 @@ smx_host_t SIMIX_req_process_get_host(smx_process_t process)
  * \param process SIMIX process
  * \return The process name
  */
-const char* SIMIX_req_process_get_name(smx_process_t process)
+const char* simcall_process_get_name(smx_process_t process)
 {
   if (process == SIMIX_process_self()) {
-    /* avoid a request if this function is called by the process itself */
+    /* avoid a simcall if this function is called by the process itself */
     return process->name;
   }
 
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_GET_NAME;
-  req->process_get_name.process = process;
-  SIMIX_request_push(req->issuer);
-  return req->process_get_name.result;
+  simcall->call = SIMCALL_PROCESS_GET_NAME;
+  simcall->process_get_name.process = process;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_get_name.result;
 }
 
 /**
@@ -564,14 +563,14 @@ const char* SIMIX_req_process_get_name(smx_process_t process)
  * \param process SIMIX process
  * \return 1, if the process is suspended, else 0.
  */
-int SIMIX_req_process_is_suspended(smx_process_t process)
+int simcall_process_is_suspended(smx_process_t process)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_IS_SUSPENDED;
-  req->process_is_suspended.process = process;
-  SIMIX_request_push(req->issuer);
-  return req->process_is_suspended.result;
+  simcall->call = SIMCALL_PROCESS_IS_SUSPENDED;
+  simcall->process_is_suspended.process = process;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_is_suspended.result;
 }
 
 /** \ingroup m_process_management
@@ -579,14 +578,14 @@ int SIMIX_req_process_is_suspended(smx_process_t process)
  *
  * This functions returns the properties associated with this process
  */
-xbt_dict_t SIMIX_req_process_get_properties(smx_process_t process)
+xbt_dict_t simcall_process_get_properties(smx_process_t process)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_GET_PROPERTIES;
-  req->process_get_properties.process = process;
-  SIMIX_request_push(req->issuer);
-  return req->process_get_properties.result;
+  simcall->call = SIMCALL_PROCESS_GET_PROPERTIES;
+  simcall->process_get_properties.process = process;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_get_properties.result;
 }
 
 /** \brief Creates a new sleep SIMIX action.
@@ -598,17 +597,17 @@ xbt_dict_t SIMIX_req_process_get_properties(smx_process_t process)
  *     \param duration Time duration of the sleep.
  *     \return A result telling whether the sleep was successful
  */
-e_smx_state_t SIMIX_req_process_sleep(double duration)
+e_smx_state_t simcall_process_sleep(double duration)
 {
   /* checking for infinite values */
   xbt_assert(isfinite(duration), "duration is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_PROCESS_SLEEP;
-  req->process_sleep.duration = duration;
-  SIMIX_request_push(req->issuer);
-  return req->process_sleep.result;
+  simcall->call = SIMCALL_PROCESS_SLEEP;
+  simcall->process_sleep.duration = duration;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->process_sleep.result;
 }
 
 /**
@@ -616,15 +615,15 @@ e_smx_state_t SIMIX_req_process_sleep(double duration)
  *  \param name The name of the rendez-vous point
  *  \return The created rendez-vous point
  */
-smx_rdv_t SIMIX_req_rdv_create(const char *name)
+smx_rdv_t simcall_rdv_create(const char *name)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_RDV_CREATE;
-  req->rdv_create.name = name;
+  simcall->call = SIMCALL_RDV_CREATE;
+  simcall->rdv_create.name = name;
 
-  SIMIX_request_push(req->issuer);
-  return req->rdv_create.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->rdv_create.result;
 }
 
 
@@ -632,50 +631,51 @@ smx_rdv_t SIMIX_req_rdv_create(const char *name)
  *  \brief Destroy a rendez-vous point
  *  \param name The rendez-vous point to destroy
  */
-void SIMIX_req_rdv_destroy(smx_rdv_t rdv)
+void simcall_rdv_destroy(smx_rdv_t rdv)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_RDV_DESTROY;
-  req->rdv_destroy.rdv = rdv;
+  simcall->call = SIMCALL_RDV_DESTROY;
+  simcall->rdv_destroy.rdv = rdv;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-smx_rdv_t SIMIX_req_rdv_get_by_name(const char *name)
+smx_rdv_t simcall_rdv_get_by_name(const char *name)
 {
-  xbt_assert(name != NULL, "Invalid parameter for SIMIX_req_rdv_get_by_name (name is NULL)");
+  xbt_assert(name != NULL, "Invalid parameter for simcall_rdv_get_by_name (name is NULL)");
 
   /* FIXME: this is a horrible lost of performance, so we hack it out by
-   * skipping the request (for now). It won't work on distributed but
-   * probably we will change MSG for that. */
-/*
-  smx_req_t req = SIMIX_req_mine();
-  req->call = REQ_RDV_GEY_BY_NAME;
-  req->rdv_get_by_name.name = name;
-  SIMIX_request_push(req->issuer);
-  return req->rdv_get_by_name.result;*/
+   * skipping the simcall (for now). It works in parallel, it won't work on
+   * distributed but probably we will change MSG for that. */
+
+  /*
+  smx_simcall_t simcall = simcall_mine();
+  simcall->call = SIMCALL_RDV_GEY_BY_NAME;
+  simcall->rdv_get_by_name.name = name;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->rdv_get_by_name.result;*/
 
   return SIMIX_rdv_get_by_name(name);
 }
 
 /**
- *  \brief counts the number of communication requests of a given host pending
- *         on a rendez-vous point
+ *  \brief Counts the number of communication actions of a given host pending
+ *         on a rendez-vous point.
  *  \param rdv The rendez-vous point
  *  \param host The host to be counted
- *  \return The number of comm request pending in the rdv
+ *  \return The number of comm actions pending in the rdv
  */
-int SIMIX_req_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
+int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_RDV_COMM_COUNT_BY_HOST;
-  req->rdv_comm_count_by_host.rdv = rdv;
-  req->rdv_comm_count_by_host.host = host;
+  simcall->call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
+  simcall->rdv_comm_count_by_host.rdv = rdv;
+  simcall->rdv_comm_count_by_host.host = host;
 
-  SIMIX_request_push(req->issuer);
-  return req->rdv_comm_count_by_host.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->rdv_comm_count_by_host.result;
 }
 
 /**
@@ -683,18 +683,18 @@ int SIMIX_req_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
  *  \param rdv The rendez-vous point
  *  \return The communication or NULL if empty
  */
-smx_action_t SIMIX_req_rdv_get_head(smx_rdv_t rdv)
+smx_action_t simcall_rdv_get_head(smx_rdv_t rdv)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_RDV_GET_HEAD;
-  req->rdv_get_head.rdv = rdv;
+  simcall->call = SIMCALL_RDV_GET_HEAD;
+  simcall->rdv_get_head.rdv = rdv;
 
-  SIMIX_request_push(req->issuer);
-  return req->rdv_get_head.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->rdv_get_head.result;
 }
 
-void SIMIX_req_comm_send(smx_rdv_t rdv, double task_size, double rate,
+void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
                          void *src_buff, size_t src_buff_size,
                          int (*match_fun)(void *, void *), void *data,
                          double timeout)
@@ -707,29 +707,29 @@ void SIMIX_req_comm_send(smx_rdv_t rdv, double task_size, double rate,
   xbt_assert(rdv, "No rendez-vous point defined for send");
 
   if (MC_IS_ENABLED) {
-    /* the model-checker wants two separate requests */
-    smx_action_t comm = SIMIX_req_comm_isend(rdv, task_size, rate,
+    /* the model-checker wants two separate simcalls */
+    smx_action_t comm = simcall_comm_isend(rdv, task_size, rate,
         src_buff, src_buff_size, match_fun, NULL, data, 0);
-    SIMIX_req_comm_wait(comm, timeout);
+    simcall_comm_wait(comm, timeout);
   }
   else {
-    smx_req_t req = SIMIX_req_mine();
-
-    req->call = REQ_COMM_SEND;
-    req->comm_send.rdv = rdv;
-    req->comm_send.task_size = task_size;
-    req->comm_send.rate = rate;
-    req->comm_send.src_buff = src_buff;
-    req->comm_send.src_buff_size = src_buff_size;
-    req->comm_send.match_fun = match_fun;
-    req->comm_send.data = data;
-    req->comm_send.timeout = timeout;
-
-    SIMIX_request_push(req->issuer);
+    smx_simcall_t simcall = SIMIX_simcall_mine();
+
+    simcall->call = SIMCALL_COMM_SEND;
+    simcall->comm_send.rdv = rdv;
+    simcall->comm_send.task_size = task_size;
+    simcall->comm_send.rate = rate;
+    simcall->comm_send.src_buff = src_buff;
+    simcall->comm_send.src_buff_size = src_buff_size;
+    simcall->comm_send.match_fun = match_fun;
+    simcall->comm_send.data = data;
+    simcall->comm_send.timeout = timeout;
+
+    SIMIX_simcall_push(simcall->issuer);
   }
 }
 
-smx_action_t SIMIX_req_comm_isend(smx_rdv_t rdv, double task_size, double rate,
+smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
                               void *src_buff, size_t src_buff_size,
                               int (*match_fun)(void *, void *),
                               void (*clean_fun)(void *),
@@ -742,129 +742,129 @@ smx_action_t SIMIX_req_comm_isend(smx_rdv_t rdv, double task_size, double rate,
   
   xbt_assert(rdv, "No rendez-vous point defined for isend");
 
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_ISEND;
-  req->comm_isend.rdv = rdv;
-  req->comm_isend.task_size = task_size;
-  req->comm_isend.rate = rate;
-  req->comm_isend.src_buff = src_buff;
-  req->comm_isend.src_buff_size = src_buff_size;
-  req->comm_isend.match_fun = match_fun;
-  req->comm_isend.clean_fun = clean_fun;
-  req->comm_isend.data = data;
-  req->comm_isend.detached = detached;
+  simcall->call = SIMCALL_COMM_ISEND;
+  simcall->comm_isend.rdv = rdv;
+  simcall->comm_isend.task_size = task_size;
+  simcall->comm_isend.rate = rate;
+  simcall->comm_isend.src_buff = src_buff;
+  simcall->comm_isend.src_buff_size = src_buff_size;
+  simcall->comm_isend.match_fun = match_fun;
+  simcall->comm_isend.clean_fun = clean_fun;
+  simcall->comm_isend.data = data;
+  simcall->comm_isend.detached = detached;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_isend.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_isend.result;
 }
 
-void SIMIX_req_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
                          int (*match_fun)(void *, void *), void *data, double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
   xbt_assert(rdv, "No rendez-vous point defined for recv");
 
   if (MC_IS_ENABLED) {
-    /* the model-checker wants two separate requests */
-    smx_action_t comm = SIMIX_req_comm_irecv(rdv, dst_buff, dst_buff_size,
+    /* the model-checker wants two separate simcalls */
+    smx_action_t comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
         match_fun, data);
-    SIMIX_req_comm_wait(comm, timeout);
+    simcall_comm_wait(comm, timeout);
   }
   else {
-    smx_req_t req = SIMIX_req_mine();
+    smx_simcall_t simcall = SIMIX_simcall_mine();
 
-    req->call = REQ_COMM_RECV;
-    req->comm_recv.rdv = rdv;
-    req->comm_recv.dst_buff = dst_buff;
-    req->comm_recv.dst_buff_size = dst_buff_size;
-    req->comm_recv.match_fun = match_fun;
-    req->comm_recv.data = data;
-    req->comm_recv.timeout = timeout;
+    simcall->call = SIMCALL_COMM_RECV;
+    simcall->comm_recv.rdv = rdv;
+    simcall->comm_recv.dst_buff = dst_buff;
+    simcall->comm_recv.dst_buff_size = dst_buff_size;
+    simcall->comm_recv.match_fun = match_fun;
+    simcall->comm_recv.data = data;
+    simcall->comm_recv.timeout = timeout;
 
-    SIMIX_request_push(req->issuer);
+    SIMIX_simcall_push(simcall->issuer);
   }
 }
 
-smx_action_t SIMIX_req_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
                                   int (*match_fun)(void *, void *), void *data)
 {
   xbt_assert(rdv, "No rendez-vous point defined for irecv");
 
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_IRECV;
-  req->comm_irecv.rdv = rdv;
-  req->comm_irecv.dst_buff = dst_buff;
-  req->comm_irecv.dst_buff_size = dst_buff_size;
-  req->comm_irecv.match_fun = match_fun;
-  req->comm_irecv.data = data;
+  simcall->call = SIMCALL_COMM_IRECV;
+  simcall->comm_irecv.rdv = rdv;
+  simcall->comm_irecv.dst_buff = dst_buff;
+  simcall->comm_irecv.dst_buff_size = dst_buff_size;
+  simcall->comm_irecv.match_fun = match_fun;
+  simcall->comm_irecv.data = data;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_irecv.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_irecv.result;
 }
 
-void SIMIX_req_comm_destroy(smx_action_t comm)
+void simcall_comm_destroy(smx_action_t comm)
 {
   xbt_assert(comm, "Invalid parameter");
 
-  /* FIXME remove this request type: comms are auto-destroyed now */
+  /* FIXME remove this simcall type: comms are auto-destroyed now */
 
   /*
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = simcall_mine();
 
-  req->call = REQ_COMM_DESTROY;
-  req->comm_destroy.comm = comm;
+  simcall->call = SIMCALL_COMM_DESTROY;
+  simcall->comm_destroy.comm = comm;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
   */
 }
 
-void SIMIX_req_comm_cancel(smx_action_t comm)
+void simcall_comm_cancel(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_CANCEL;
-  req->comm_cancel.comm = comm;
+  simcall->call = SIMCALL_COMM_CANCEL;
+  simcall->comm_cancel.comm = comm;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-unsigned int SIMIX_req_comm_waitany(xbt_dynar_t comms)
+unsigned int simcall_comm_waitany(xbt_dynar_t comms)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_WAITANY;
-  req->comm_waitany.comms = comms;
+  simcall->call = SIMCALL_COMM_WAITANY;
+  simcall->comm_waitany.comms = comms;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_waitany.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_waitany.result;
 }
 
-int SIMIX_req_comm_testany(xbt_dynar_t comms)
+int simcall_comm_testany(xbt_dynar_t comms)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
   if (xbt_dynar_is_empty(comms))
     return -1;
 
-  req->call = REQ_COMM_TESTANY;
-  req->comm_testany.comms = comms;
+  simcall->call = SIMCALL_COMM_TESTANY;
+  simcall->comm_testany.comms = comms;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_testany.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_testany.result;
 }
 
-void SIMIX_req_comm_wait(smx_action_t comm, double timeout)
+void simcall_comm_wait(smx_action_t comm, double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_WAIT;
-  req->comm_wait.comm = comm;
-  req->comm_wait.timeout = timeout;
+  simcall->call = SIMCALL_COMM_WAIT;
+  simcall->comm_wait.comm = comm;
+  simcall->comm_wait.timeout = timeout;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 #ifdef HAVE_TRACING
@@ -875,321 +875,320 @@ void SIMIX_req_comm_wait(smx_action_t comm, double timeout)
  * \param execution The execution action
  * \param category The tracing category
  */
-void SIMIX_req_set_category(smx_action_t action, const char *category)
+void simcall_set_category(smx_action_t action, const char *category)
 {
   if (category == NULL) {
     return;
   }
 
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SET_CATEGORY;
-  req->set_category.action = action;
-  req->set_category.category = category;
+  simcall->call = SIMCALL_SET_CATEGORY;
+  simcall->set_category.action = action;
+  simcall->set_category.category = category;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 #endif
 
-int SIMIX_req_comm_test(smx_action_t comm)
+int simcall_comm_test(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_TEST;
-  req->comm_test.comm = comm;
+  simcall->call = SIMCALL_COMM_TEST;
+  simcall->comm_test.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_test.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_test.result;
 }
 
-double SIMIX_req_comm_get_remains(smx_action_t comm)
+double simcall_comm_get_remains(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_GET_REMAINS;
-  req->comm_get_remains.comm = comm;
+  simcall->call = SIMCALL_COMM_GET_REMAINS;
+  simcall->comm_get_remains.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_get_remains.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_get_remains.result;
 }
 
-e_smx_state_t SIMIX_req_comm_get_state(smx_action_t comm)
+e_smx_state_t simcall_comm_get_state(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_GET_STATE;
-  req->comm_get_state.comm = comm;
+  simcall->call = SIMCALL_COMM_GET_STATE;
+  simcall->comm_get_state.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_get_state.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_get_state.result;
 }
 
-void *SIMIX_req_comm_get_src_data(smx_action_t comm)
+void *simcall_comm_get_src_data(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_GET_SRC_DATA;
-  req->comm_get_src_data.comm = comm;
+  simcall->call = SIMCALL_COMM_GET_SRC_DATA;
+  simcall->comm_get_src_data.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_get_src_data.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_get_src_data.result;
 }
 
-void *SIMIX_req_comm_get_dst_data(smx_action_t comm)
+void *simcall_comm_get_dst_data(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_GET_DST_DATA;
-  req->comm_get_dst_data.comm = comm;
+  simcall->call = SIMCALL_COMM_GET_DST_DATA;
+  simcall->comm_get_dst_data.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_get_dst_data.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_get_dst_data.result;
 }
 
-smx_process_t SIMIX_req_comm_get_src_proc(smx_action_t comm)
+smx_process_t simcall_comm_get_src_proc(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_GET_SRC_PROC;
-  req->comm_get_src_proc.comm = comm;
+  simcall->call = SIMCALL_COMM_GET_SRC_PROC;
+  simcall->comm_get_src_proc.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_get_src_proc.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_get_src_proc.result;
 }
 
-smx_process_t SIMIX_req_comm_get_dst_proc(smx_action_t comm)
+smx_process_t simcall_comm_get_dst_proc(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_GET_DST_PROC;
-  req->comm_get_dst_proc.comm = comm;
+  simcall->call = SIMCALL_COMM_GET_DST_PROC;
+  simcall->comm_get_dst_proc.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_get_dst_proc.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_get_dst_proc.result;
 }
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-int SIMIX_req_comm_is_latency_bounded(smx_action_t comm)
+int simcall_comm_is_latency_bounded(smx_action_t comm)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COMM_IS_LATENCY_BOUNDED;
-  req->comm_is_latency_bounded.comm = comm;
+  simcall->call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
+  simcall->comm_is_latency_bounded.comm = comm;
 
-  SIMIX_request_push(req->issuer);
-  return req->comm_is_latency_bounded.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->comm_is_latency_bounded.result;
 }
 #endif
 
-smx_mutex_t SIMIX_req_mutex_init(void)
+smx_mutex_t simcall_mutex_init(void)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_MUTEX_INIT;
+  simcall->call = SIMCALL_MUTEX_INIT;
 
-  SIMIX_request_push(req->issuer);
-  return req->mutex_init.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->mutex_init.result;
 }
 
-void SIMIX_req_mutex_destroy(smx_mutex_t mutex)
+void simcall_mutex_destroy(smx_mutex_t mutex)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_MUTEX_DESTROY;
-  req->mutex_destroy.mutex = mutex;
+  simcall->call = SIMCALL_MUTEX_DESTROY;
+  simcall->mutex_destroy.mutex = mutex;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_mutex_lock(smx_mutex_t mutex)
+void simcall_mutex_lock(smx_mutex_t mutex)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_MUTEX_LOCK;
-  req->mutex_lock.mutex = mutex;
+  simcall->call = SIMCALL_MUTEX_LOCK;
+  simcall->mutex_lock.mutex = mutex;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-int SIMIX_req_mutex_trylock(smx_mutex_t mutex)
+int simcall_mutex_trylock(smx_mutex_t mutex)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_MUTEX_TRYLOCK;
-  req->mutex_trylock.mutex = mutex;
+  simcall->call = SIMCALL_MUTEX_TRYLOCK;
+  simcall->mutex_trylock.mutex = mutex;
 
-  SIMIX_request_push(req->issuer);
-  return req->mutex_trylock.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->mutex_trylock.result;
 }
 
-void SIMIX_req_mutex_unlock(smx_mutex_t mutex)
+void simcall_mutex_unlock(smx_mutex_t mutex)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_MUTEX_UNLOCK;
-  req->mutex_unlock.mutex = mutex;
+  simcall->call = SIMCALL_MUTEX_UNLOCK;
+  simcall->mutex_unlock.mutex = mutex;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 
-smx_cond_t SIMIX_req_cond_init(void)
+smx_cond_t simcall_cond_init(void)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COND_INIT;
+  simcall->call = SIMCALL_COND_INIT;
 
-  SIMIX_request_push(req->issuer);
-  return req->cond_init.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->cond_init.result;
 }
 
-void SIMIX_req_cond_destroy(smx_cond_t cond)
+void simcall_cond_destroy(smx_cond_t cond)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COND_DESTROY;
-  req->cond_destroy.cond = cond;
+  simcall->call = SIMCALL_COND_DESTROY;
+  simcall->cond_destroy.cond = cond;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_cond_signal(smx_cond_t cond)
+void simcall_cond_signal(smx_cond_t cond)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COND_SIGNAL;
-  req->cond_signal.cond = cond;
+  simcall->call = SIMCALL_COND_SIGNAL;
+  simcall->cond_signal.cond = cond;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
+void simcall_cond_wait(smx_cond_t cond, smx_mutex_t mutex)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COND_WAIT;
-  req->cond_wait.cond = cond;
-  req->cond_wait.mutex = mutex;
+  simcall->call = SIMCALL_COND_WAIT;
+  simcall->cond_wait.cond = cond;
+  simcall->cond_wait.mutex = mutex;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_cond_wait_timeout(smx_cond_t cond,
+void simcall_cond_wait_timeout(smx_cond_t cond,
                                  smx_mutex_t mutex,
                                  double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COND_WAIT_TIMEOUT;
-  req->cond_wait_timeout.cond = cond;
-  req->cond_wait_timeout.mutex = mutex;
-  req->cond_wait_timeout.timeout = timeout;
+  simcall->call = SIMCALL_COND_WAIT_TIMEOUT;
+  simcall->cond_wait_timeout.cond = cond;
+  simcall->cond_wait_timeout.mutex = mutex;
+  simcall->cond_wait_timeout.timeout = timeout;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_cond_broadcast(smx_cond_t cond)
+void simcall_cond_broadcast(smx_cond_t cond)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_COND_BROADCAST;
-  req->cond_broadcast.cond = cond;
+  simcall->call = SIMCALL_COND_BROADCAST;
+  simcall->cond_broadcast.cond = cond;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 
-smx_sem_t SIMIX_req_sem_init(int capacity)
+smx_sem_t simcall_sem_init(int capacity)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_INIT;
-  req->sem_init.capacity = capacity;
+  simcall->call = SIMCALL_SEM_INIT;
+  simcall->sem_init.capacity = capacity;
 
-  SIMIX_request_push(req->issuer);
-  return req->sem_init.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->sem_init.result;
 }
 
-void SIMIX_req_sem_destroy(smx_sem_t sem)
+void simcall_sem_destroy(smx_sem_t sem)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_DESTROY;
-  req->sem_destroy.sem = sem;
+  simcall->call = SIMCALL_SEM_DESTROY;
+  simcall->sem_destroy.sem = sem;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_sem_release(smx_sem_t sem)
+void simcall_sem_release(smx_sem_t sem)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_RELEASE;
-  req->sem_release.sem = sem;
+  simcall->call = SIMCALL_SEM_RELEASE;
+  simcall->sem_release.sem = sem;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-int SIMIX_req_sem_would_block(smx_sem_t sem)
+int simcall_sem_would_block(smx_sem_t sem)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_WOULD_BLOCK;
-  req->sem_would_block.sem = sem;
+  simcall->call = SIMCALL_SEM_WOULD_BLOCK;
+  simcall->sem_would_block.sem = sem;
 
-  SIMIX_request_push(req->issuer);
-  return req->sem_would_block.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->sem_would_block.result;
 }
 
-void SIMIX_req_sem_acquire(smx_sem_t sem)
+void simcall_sem_acquire(smx_sem_t sem)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_ACQUIRE;
-  req->sem_acquire.sem = sem;
+  simcall->call = SIMCALL_SEM_ACQUIRE;
+  simcall->sem_acquire.sem = sem;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-void SIMIX_req_sem_acquire_timeout(smx_sem_t sem, double timeout)
+void simcall_sem_acquire_timeout(smx_sem_t sem, double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
   
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_ACQUIRE_TIMEOUT;
-  req->sem_acquire_timeout.sem = sem;
-  req->sem_acquire_timeout.timeout = timeout;
+  simcall->call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
+  simcall->sem_acquire_timeout.sem = sem;
+  simcall->sem_acquire_timeout.timeout = timeout;
 
-  SIMIX_request_push(req->issuer);
+  SIMIX_simcall_push(simcall->issuer);
 }
 
-int SIMIX_req_sem_get_capacity(smx_sem_t sem)
+int simcall_sem_get_capacity(smx_sem_t sem)
 {
-  smx_req_t req = SIMIX_req_mine();
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
-  req->call = REQ_SEM_GET_CAPACITY;
-  req->sem_get_capacity.sem = sem;
+  simcall->call = SIMCALL_SEM_GET_CAPACITY;
+  simcall->sem_get_capacity.sem = sem;
 
-  SIMIX_request_push(req->issuer);
-  return req->sem_get_capacity.result;
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->sem_get_capacity.result;
 }
 
-void SIMIX_req_file_read(char* name)
+void simcall_file_read(char* name)
 {
-         smx_req_t req = SIMIX_req_mine();
-
-         req->call = REQ_FILE_READ;
-         req->file_read.name = name;
-         SIMIX_request_push(req->issuer);
+  smx_simcall_t simcall = SIMIX_simcall_mine();
 
+  simcall->call = SIMCALL_FILE_READ;
+  simcall->file_read.name = name;
+  SIMIX_simcall_push(simcall->issuer);
 }
 
 /* ************************************************************************** */
 
-/** @brief returns a printable string representing the request kind */
-const char *SIMIX_request_name(int kind) {
-  return request_names[kind];
+/** @brief returns a printable string representing a simcall */
+const char *SIMIX_simcall_name(e_smx_simcall_t kind) {
+  return simcall_names[kind];
 }
index 39859d8..d06a471 100644 (file)
@@ -100,7 +100,7 @@ void smpi_mpi_start(MPI_Request request)
     print_request("New recv", request);
     mailbox = smpi_process_mailbox();
     // FIXME: SIMIX does not yet support non-contiguous datatypes
-    request->action = SIMIX_req_comm_irecv(mailbox, request->buf, &request->size, &match_recv, request);
+    request->action = simcall_comm_irecv(mailbox, request->buf, &request->size, &match_recv, request);
   } else {
     print_request("New send", request);
     mailbox = smpi_process_remote_mailbox(
@@ -117,7 +117,7 @@ void smpi_mpi_start(MPI_Request request)
        XBT_DEBUG("Send request %p is not detached (buf: %p)",request,request->buf);
     }
     request->action = 
-               SIMIX_req_comm_isend(mailbox, request->size, -1.0,
+               simcall_comm_isend(mailbox, request->size, -1.0,
                                    request->buf, request->size,
                                    &match_send,
                                    &smpi_mpi_request_free_voidp, // how to free the userdata if a detached send fails
@@ -126,7 +126,7 @@ void smpi_mpi_start(MPI_Request request)
                                    detached);
 
 #ifdef HAVE_TRACING
-    SIMIX_req_set_category (request->action, TRACE_internal_smpi_get_category());
+    simcall_set_category (request->action, TRACE_internal_smpi_get_category());
 #endif
   }
 }
@@ -255,7 +255,7 @@ int flag;
    if ((*request)->action == NULL)
        flag = 1;
    else 
-    flag = SIMIX_req_comm_test((*request)->action);
+    flag = simcall_comm_test((*request)->action);
    if(flag) {
                    smpi_mpi_wait(request, status);
          }
@@ -283,7 +283,7 @@ int smpi_mpi_testany(int count, MPI_Request requests[], int *index,
       }
     }
     if(size > 0) {
-      i = SIMIX_req_comm_testany(comms);
+      i = simcall_comm_testany(comms);
       // FIXME: MPI_UNDEFINED or does SIMIX have a return code?
       if(i != MPI_UNDEFINED) {
         *index = map[i];
@@ -301,7 +301,7 @@ void smpi_mpi_wait(MPI_Request * request, MPI_Status * status)
 {
   print_request("Waiting", *request);
   if ((*request)->action != NULL) { // this is not a detached send
-    SIMIX_req_comm_wait((*request)->action, -1.0);
+    simcall_comm_wait((*request)->action, -1.0);
     finish_wait(request, status);
   }
   // FIXME for a detached send, finish_wait is not called:
@@ -330,7 +330,7 @@ int smpi_mpi_waitany(int count, MPI_Request requests[],
       }
     }
     if(size > 0) {
-      i = SIMIX_req_comm_waitany(comms);
+      i = simcall_comm_waitany(comms);
       // FIXME: MPI_UNDEFINED or does SIMIX have a return code?
       if (i != MPI_UNDEFINED) {
         index = map[i];
index d695730..8c80d79 100644 (file)
@@ -133,11 +133,11 @@ static void smpi_execute_flops(double flops)
   host = SIMIX_host_self();
 
   XBT_DEBUG("Handle real computation time: %f flops", flops);
-  action = SIMIX_req_host_execute("computation", host, flops, 1);
+  action = simcall_host_execute("computation", host, flops, 1);
 #ifdef HAVE_TRACING
-  SIMIX_req_set_category (action, TRACE_internal_smpi_get_category());
+  simcall_set_category (action, TRACE_internal_smpi_get_category());
 #endif
-  SIMIX_req_host_execution_wait(action);
+  simcall_host_execution_wait(action);
 }
 
 static void smpi_execute(double duration)
index 22bdf9e..69b94b8 100644 (file)
@@ -50,7 +50,7 @@ void smpi_process_init(int *argc, char ***argv)
     proc = SIMIX_process_self();
     index = atoi((*argv)[1]);
     data = smpi_process_remote_data(index);
-    SIMIX_req_process_set_data(proc, data);
+    simcall_process_set_data(proc, data);
     if (*argc > 2) {
       free((*argv)[1]);
       memmove(&(*argv)[1], &(*argv)[2], sizeof(char *) * (*argc - 2));
@@ -77,7 +77,7 @@ void smpi_process_finalize(void)
 {
   // wait for all pending asynchronous comms to finish
   while (SIMIX_process_has_pending_comms(SIMIX_process_self())) {
-    SIMIX_req_process_sleep(1);
+    simcall_process_sleep(1);
   }
 }
 
@@ -199,7 +199,7 @@ void smpi_global_init(void)
     process_data[i]->index = i;
     process_data[i]->argc = NULL;
     process_data[i]->argv = NULL;
-    process_data[i]->mailbox = SIMIX_req_rdv_create(get_mailbox_name(name, i));
+    process_data[i]->mailbox = simcall_rdv_create(get_mailbox_name(name, i));
     process_data[i]->timer = xbt_os_timer_new();
     group = smpi_group_new(1);
     process_data[i]->comm_self = smpi_comm_new(group);
@@ -223,7 +223,7 @@ void smpi_global_destroy(void)
   for (i = 0; i < count; i++) {
     smpi_comm_destroy(process_data[i]->comm_self);
     xbt_os_timer_free(process_data[i]->timer);
-    SIMIX_req_rdv_destroy(process_data[i]->mailbox);
+    simcall_rdv_destroy(process_data[i]->mailbox);
     xbt_free(process_data[i]);
   }
   xbt_free(process_data);
index c7c901f..db8815d 100644 (file)
@@ -88,7 +88,7 @@ int PMPI_Abort(MPI_Comm comm, int errorcode)
   smpi_bench_end();
   smpi_process_destroy();
   // FIXME: should kill all processes in comm instead
-  SIMIX_req_process_kill(SIMIX_process_self());
+  simcall_process_kill(SIMIX_process_self());
   return MPI_SUCCESS;
 }
 
index cddfce7..34dba4a 100644 (file)
@@ -39,7 +39,7 @@ static int xbt_thread_create_wrapper(int argc, char *argv[])
   smx_process_t self = SIMIX_process_self();
   xbt_thread_t t =
       (xbt_thread_t) SIMIX_process_self_get_data(self);
-  SIMIX_req_process_set_data(self, t->father_data);
+  simcall_process_set_data(self, t->father_data);
   t->code(t->userparam);
   if (t->joinable) {
     t->done = 1;
@@ -64,7 +64,7 @@ xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code,
   res->code = code;
   res->father_data = SIMIX_process_self_get_data(SIMIX_process_self());
   /*   char*name = bprintf("%s#%p",SIMIX_process_self_get_name(), param); */
-  SIMIX_req_process_create(&res->s_process, name,
+  simcall_process_create(&res->s_process, name,
                            xbt_thread_create_wrapper, res,
                            SIMIX_host_self_get_name(), 0, NULL,
                            /*props */ NULL);
@@ -107,14 +107,14 @@ void xbt_thread_join(xbt_thread_t thread)
 
 void xbt_thread_cancel(xbt_thread_t thread)
 {
-  SIMIX_req_process_kill(thread->s_process);
+  simcall_process_kill(thread->s_process);
   free(thread->name);
   free(thread);
 }
 
 void xbt_thread_exit()
 {
-  SIMIX_req_process_kill(SIMIX_process_self());
+  simcall_process_kill(SIMIX_process_self());
 }
 
 xbt_thread_t xbt_thread_self(void)
@@ -134,22 +134,22 @@ struct s_xbt_mutex_ {
 
 xbt_mutex_t xbt_mutex_init(void)
 {
-  return (xbt_mutex_t) SIMIX_req_mutex_init();
+  return (xbt_mutex_t) simcall_mutex_init();
 }
 
 void xbt_mutex_acquire(xbt_mutex_t mutex)
 {
-  SIMIX_req_mutex_lock((smx_mutex_t) mutex);
+  simcall_mutex_lock((smx_mutex_t) mutex);
 }
 
 void xbt_mutex_release(xbt_mutex_t mutex)
 {
-  SIMIX_req_mutex_unlock((smx_mutex_t) mutex);
+  simcall_mutex_unlock((smx_mutex_t) mutex);
 }
 
 void xbt_mutex_destroy(xbt_mutex_t mutex)
 {
-  SIMIX_req_mutex_destroy((smx_mutex_t) mutex);
+  simcall_mutex_destroy((smx_mutex_t) mutex);
 }
 
 /***** condition related functions *****/
@@ -159,30 +159,30 @@ struct s_xbt_cond_ {
 
 xbt_cond_t xbt_cond_init(void)
 {
-  return (xbt_cond_t) SIMIX_req_cond_init();
+  return (xbt_cond_t) simcall_cond_init();
 }
 
 void xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex)
 {
-  SIMIX_req_cond_wait((smx_cond_t) cond, (smx_mutex_t) mutex);
+  simcall_cond_wait((smx_cond_t) cond, (smx_mutex_t) mutex);
 }
 
 void xbt_cond_timedwait(xbt_cond_t cond, xbt_mutex_t mutex, double delay)
 {
-  SIMIX_req_cond_wait_timeout((smx_cond_t) cond, (smx_mutex_t) mutex, delay);
+  simcall_cond_wait_timeout((smx_cond_t) cond, (smx_mutex_t) mutex, delay);
 }
 
 void xbt_cond_signal(xbt_cond_t cond)
 {
-  SIMIX_req_cond_signal((smx_cond_t) cond);
+  simcall_cond_signal((smx_cond_t) cond);
 }
 
 void xbt_cond_broadcast(xbt_cond_t cond)
 {
-  SIMIX_req_cond_broadcast((smx_cond_t) cond);
+  simcall_cond_broadcast((smx_cond_t) cond);
 }
 
 void xbt_cond_destroy(xbt_cond_t cond)
 {
-  SIMIX_req_cond_destroy((smx_cond_t) cond);
+  simcall_cond_destroy((smx_cond_t) cond);
 }
index 96fab4b..726b0c2 100644 (file)
@@ -23,7 +23,7 @@ double xbt_time()
  */
 void xbt_sleep(double sec)
 {
-  SIMIX_req_process_sleep(sec);
+  simcall_process_sleep(sec);
 }
 
 const char *xbt_procname(void)