Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Generate automatically the simcall_HANDLER_* prototypes
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Nov 2014 01:23:31 +0000 (02:23 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Nov 2014 01:31:35 +0000 (02:31 +0100)
- Writing this code manually was burdensome
- This allows to check that the definition in simcall.in actually
  match the handler prototype (safer as we are casting wildly)
- This allows to detect (and destroy) some now unused simcalls

17 files changed:
src/mc/mc_interface.h
src/simix/popping_accessors.h
src/simix/popping_bodies.c
src/simix/popping_generated.c
src/simix/popping_private.h
src/simix/simcalls.in
src/simix/simcalls.py
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_process.c
src/simix/smx_process_private.h
src/simix/smx_synchro.c
src/simix/smx_synchro_private.h

index c2e8042..d4afe68 100644 (file)
@@ -13,11 +13,6 @@ SG_BEGIN_DECL()
 
 typedef struct s_mc_snapshot *mc_snapshot_t;
 
-/* These are the MC-specific simcalls, that smx_user needs to see */
-mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
-int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
-int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
-
 SG_END_DECL()
 
 #endif
index 0c298b9..12b34d1 100644 (file)
@@ -375,8 +375,8 @@ static inline smx_action_t simcall_host_execution_get_state__get__execution(smx_
 static inline void simcall_host_execution_get_state__set__execution(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
-static inline int simcall_host_execution_get_state__get__result(smx_simcall_t simcall){
-    return  simcall->result.i;
+static inline e_smx_state_t simcall_host_execution_get_state__get__result(smx_simcall_t simcall){
+    return (e_smx_state_t) simcall->result.i;
 }
 static inline void simcall_host_execution_get_state__set__result(smx_simcall_t simcall, int result){
     simcall->result.i = result;
@@ -527,8 +527,8 @@ static inline smx_host_t simcall_vm_create__get__ind_pm(smx_simcall_t simcall){
 static inline void simcall_vm_create__set__ind_pm(smx_simcall_t simcall, void* arg){
     simcall->args[1].dp = arg;
 }
-static inline void* simcall_vm_create__get__result(smx_simcall_t simcall){
-    return  simcall->result.dp;
+static inline smx_host_t simcall_vm_create__get__result(smx_simcall_t simcall){
+    return (smx_host_t) simcall->result.dp;
 }
 static inline void simcall_vm_create__set__result(smx_simcall_t simcall, void* result){
     simcall->result.dp = result;
@@ -1549,8 +1549,8 @@ static inline smx_action_t simcall_comm_get_state__get__comm(smx_simcall_t simca
 static inline void simcall_comm_get_state__set__comm(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
-static inline int simcall_comm_get_state__get__result(smx_simcall_t simcall){
-    return  simcall->result.i;
+static inline e_smx_state_t simcall_comm_get_state__get__result(smx_simcall_t simcall){
+    return (e_smx_state_t) simcall->result.i;
 }
 static inline void simcall_comm_get_state__set__result(smx_simcall_t simcall, int result){
     simcall->result.i = result;
@@ -1726,12 +1726,12 @@ static inline void simcall_cond_broadcast__set__cond(smx_simcall_t simcall, void
     simcall->args[0].dp = arg;
 }
 
-static inline int simcall_sem_init__get__capacity(smx_simcall_t simcall){
-  return  simcall->args[0].i;
+static inline unsigned int simcall_sem_init__get__capacity(smx_simcall_t simcall){
+  return  simcall->args[0].ui;
 }
 
-static inline void simcall_sem_init__set__capacity(smx_simcall_t simcall, int arg){
-    simcall->args[0].i = arg;
+static inline void simcall_sem_init__set__capacity(smx_simcall_t simcall, unsigned int arg){
+    simcall->args[0].ui = arg;
 }
 static inline smx_sem_t simcall_sem_init__get__result(smx_simcall_t simcall){
     return (smx_sem_t) simcall->result.dp;
@@ -2134,23 +2134,23 @@ static inline void simcall_set_category__set__category(smx_simcall_t simcall, co
 #endif
 
 #ifdef HAVE_MC
-static inline void* simcall_mc_snapshot__get__result(smx_simcall_t simcall){
-    return  simcall->result.dp;
+static inline mc_snapshot_t simcall_mc_snapshot__get__result(smx_simcall_t simcall){
+    return (mc_snapshot_t) simcall->result.dp;
 }
 static inline void simcall_mc_snapshot__set__result(smx_simcall_t simcall, void* result){
     simcall->result.dp = result;
 }
 
-static inline void* simcall_mc_compare_snapshots__get__s1(smx_simcall_t simcall){
-  return  simcall->args[0].dp;
+static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s1(smx_simcall_t simcall){
+  return (mc_snapshot_t) simcall->args[0].dp;
 }
 
 static inline void simcall_mc_compare_snapshots__set__s1(smx_simcall_t simcall, void* arg){
     simcall->args[0].dp = arg;
 }
 
-static inline void* simcall_mc_compare_snapshots__get__s2(smx_simcall_t simcall){
-  return  simcall->args[1].dp;
+static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s2(smx_simcall_t simcall){
+  return (mc_snapshot_t) simcall->args[1].dp;
 }
 
 static inline void simcall_mc_compare_snapshots__set__s2(smx_simcall_t simcall, void* arg){
@@ -2185,3 +2185,137 @@ static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int res
     simcall->result.i = result;
 }
 #endif
+
+
+/* The prototype of all simcall handlers */
+smx_host_t simcall_HANDLER_host_get_by_name(smx_simcall_t simcall, const char* name);
+const char* simcall_HANDLER_host_get_name(smx_simcall_t simcall, smx_host_t host);
+void simcall_HANDLER_host_on(smx_simcall_t simcall, smx_host_t host);
+void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t host);
+xbt_dict_t simcall_HANDLER_host_get_properties(smx_simcall_t simcall, smx_host_t host);
+int simcall_HANDLER_host_get_core(smx_simcall_t simcall, smx_host_t host);
+xbt_swag_t simcall_HANDLER_host_get_process_list(smx_simcall_t simcall, smx_host_t host);
+double simcall_HANDLER_host_get_speed(smx_simcall_t simcall, smx_host_t host);
+double simcall_HANDLER_host_get_available_speed(smx_simcall_t simcall, smx_host_t host);
+int simcall_HANDLER_host_get_state(smx_simcall_t simcall, smx_host_t host);
+double simcall_HANDLER_host_get_current_power_peak(smx_simcall_t simcall, smx_host_t host);
+double simcall_HANDLER_host_get_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index);
+int simcall_HANDLER_host_get_nb_pstates(smx_simcall_t simcall, smx_host_t host);
+void simcall_HANDLER_host_set_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index);
+double simcall_HANDLER_host_get_consumed_energy(smx_simcall_t simcall, smx_host_t host);
+smx_action_t simcall_HANDLER_host_execute(smx_simcall_t simcall, const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask);
+smx_action_t simcall_HANDLER_host_parallel_execute(smx_simcall_t simcall, const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate);
+void simcall_HANDLER_host_execution_destroy(smx_simcall_t simcall, smx_action_t execution);
+void simcall_HANDLER_host_execution_cancel(smx_simcall_t simcall, smx_action_t execution);
+double simcall_HANDLER_host_execution_get_remains(smx_simcall_t simcall, smx_action_t execution);
+e_smx_state_t simcall_HANDLER_host_execution_get_state(smx_simcall_t simcall, smx_action_t execution);
+void simcall_HANDLER_host_execution_set_priority(smx_simcall_t simcall, smx_action_t execution, double priority);
+void simcall_HANDLER_host_execution_set_bound(smx_simcall_t simcall, smx_action_t execution, double bound);
+void simcall_HANDLER_host_execution_set_affinity(smx_simcall_t simcall, smx_action_t execution, smx_host_t ws, unsigned long mask);
+void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_action_t execution);
+xbt_dict_t simcall_HANDLER_host_get_mounted_storage_list(smx_simcall_t simcall, smx_host_t host);
+xbt_dynar_t simcall_HANDLER_host_get_attached_storage_list(smx_simcall_t simcall, smx_host_t host);
+void simcall_HANDLER_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
+void simcall_HANDLER_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
+smx_host_t simcall_HANDLER_vm_create(smx_simcall_t simcall, const char* name, smx_host_t ind_pm);
+void simcall_HANDLER_vm_start(smx_simcall_t simcall, smx_host_t ind_vm);
+int simcall_HANDLER_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm);
+void* simcall_HANDLER_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound);
+void simcall_HANDLER_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask);
+void simcall_HANDLER_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_process_create(smx_simcall_t simcall, smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart);
+void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid);
+void simcall_HANDLER_process_cleanup(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process, smx_host_t dest);
+void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process);
+int simcall_HANDLER_process_count(smx_simcall_t simcall);
+int simcall_HANDLER_process_get_PID(smx_simcall_t simcall, smx_process_t process);
+int simcall_HANDLER_process_get_PPID(smx_simcall_t simcall, smx_process_t process);
+void* simcall_HANDLER_process_get_data(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_set_data(smx_simcall_t simcall, smx_process_t process, void* data);
+smx_host_t simcall_HANDLER_process_get_host(smx_simcall_t simcall, smx_process_t process);
+const char* simcall_HANDLER_process_get_name(smx_simcall_t simcall, smx_process_t process);
+int simcall_HANDLER_process_is_suspended(smx_simcall_t simcall, smx_process_t process);
+xbt_dict_t simcall_HANDLER_process_get_properties(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout);
+void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
+void simcall_HANDLER_process_on_exit(smx_simcall_t simcall, smx_process_t process, int_f_pvoid_pvoid_t fun, void* data);
+void simcall_HANDLER_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process, int auto_restart);
+smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process);
+smx_rdv_t simcall_HANDLER_rdv_create(smx_simcall_t simcall, const char* name);
+void simcall_HANDLER_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv);
+unsigned int simcall_HANDLER_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host);
+smx_action_t simcall_HANDLER_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv);
+void simcall_HANDLER_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv, smx_process_t receiver);
+smx_process_t simcall_HANDLER_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv);
+smx_action_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data);
+void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
+smx_action_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached);
+void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate);
+smx_action_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
+void simcall_HANDLER_comm_cancel(smx_simcall_t simcall, smx_action_t comm);
+void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t comms);
+void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_action_t comm, double timeout);
+void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_action_t comm);
+void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t comms);
+double simcall_HANDLER_comm_get_remains(smx_simcall_t simcall, smx_action_t comm);
+e_smx_state_t simcall_HANDLER_comm_get_state(smx_simcall_t simcall, smx_action_t comm);
+void* simcall_HANDLER_comm_get_src_data(smx_simcall_t simcall, smx_action_t comm);
+void* simcall_HANDLER_comm_get_dst_data(smx_simcall_t simcall, smx_action_t comm);
+smx_process_t simcall_HANDLER_comm_get_src_proc(smx_simcall_t simcall, smx_action_t comm);
+smx_process_t simcall_HANDLER_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t comm);
+smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall);
+void simcall_HANDLER_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex);
+void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex);
+int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex);
+void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex);
+smx_cond_t simcall_HANDLER_cond_init(smx_simcall_t simcall);
+void simcall_HANDLER_cond_destroy(smx_simcall_t simcall, smx_cond_t cond);
+void simcall_HANDLER_cond_signal(smx_simcall_t simcall, smx_cond_t cond);
+void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex);
+void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout);
+void simcall_HANDLER_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond);
+smx_sem_t simcall_HANDLER_sem_init(smx_simcall_t simcall, unsigned int capacity);
+void simcall_HANDLER_sem_destroy(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_sem_release(smx_simcall_t simcall, smx_sem_t sem);
+int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout);
+int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host);
+void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host);
+void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host);
+void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
+int simcall_HANDLER_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
+sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd);
+sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd);
+int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin);
+xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd);
+int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath);
+sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage);
+sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t name);
+xbt_dict_t simcall_HANDLER_storage_get_properties(smx_simcall_t simcall, smx_storage_t storage);
+xbt_dict_t simcall_HANDLER_storage_get_content(smx_simcall_t simcall, smx_storage_t storage);
+xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char* name);
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+int simcall_HANDLER_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t comm);
+#endif
+
+#ifdef HAVE_TRACING
+void simcall_HANDLER_set_category(smx_simcall_t simcall, smx_action_t action, const char* category);
+#endif
+
+#ifdef HAVE_MC
+mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
+int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
+int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
+#endif
index dc64375..feee21c 100644 (file)
@@ -450,7 +450,7 @@ inline static double simcall_BODY_host_execution_get_remains(smx_action_t execut
     return self->simcall.result.d;
   }
   
-inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
+inline static e_smx_state_t simcall_BODY_host_execution_get_state(smx_action_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -645,7 +645,7 @@ inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t p
     
   }
   
-inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
+inline static smx_host_t simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -1776,7 +1776,7 @@ inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
     return self->simcall.result.d;
   }
   
-inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
+inline static e_smx_state_t simcall_BODY_comm_get_state(smx_action_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -2115,7 +2115,7 @@ inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
     
   }
   
-inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
+inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -2125,7 +2125,7 @@ inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
     self->simcall.call = SIMCALL_SEM_INIT;
     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].i = (int) capacity;
+    self->simcall.args[0].ui = (unsigned int) capacity;
     if (self != simix_global->maestro_process) {
       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
@@ -2638,7 +2638,7 @@ inline static void simcall_BODY_set_category(smx_action_t action, const char* ca
 
 #ifdef HAVE_MC
   
-inline static void* simcall_BODY_mc_snapshot() {
+inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
@@ -2659,7 +2659,7 @@ inline static void* simcall_BODY_mc_snapshot() {
     return self->simcall.result.dp;
   }
   
-inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
+inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
index 8a7cdbc..e27317c 100644 (file)
@@ -22,136 +22,136 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
 
 /** @brief Simcalls' names (generated from src/simix/simcalls.in) */
 const char* simcall_names[] = {
-[SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
-[SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
-[SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
-[SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
-[SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
-[SIMCALL_HOST_GET_CORE] = "SIMCALL_HOST_GET_CORE",
-[SIMCALL_HOST_GET_PROCESS_LIST] = "SIMCALL_HOST_GET_PROCESS_LIST",
-[SIMCALL_HOST_GET_SPEED] = "SIMCALL_HOST_GET_SPEED",
-[SIMCALL_HOST_GET_AVAILABLE_SPEED] = "SIMCALL_HOST_GET_AVAILABLE_SPEED",
-[SIMCALL_HOST_GET_STATE] = "SIMCALL_HOST_GET_STATE",
-[SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
-[SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
-[SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
-[SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
-[SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
-[SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
-[SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
-[SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY",
-[SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL",
-[SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS",
-[SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE",
-[SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY",
-[SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND",
-[SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY",
-[SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT",
-[SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
-[SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
-[SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
-[SIMCALL_HOST_SET_PARAMS] = "SIMCALL_HOST_SET_PARAMS",
-[SIMCALL_VM_CREATE] = "SIMCALL_VM_CREATE",
-[SIMCALL_VM_START] = "SIMCALL_VM_START",
-[SIMCALL_VM_GET_STATE] = "SIMCALL_VM_GET_STATE",
-[SIMCALL_VM_MIGRATE] = "SIMCALL_VM_MIGRATE",
-[SIMCALL_VM_GET_PM] = "SIMCALL_VM_GET_PM",
-[SIMCALL_VM_SET_BOUND] = "SIMCALL_VM_SET_BOUND",
-[SIMCALL_VM_SET_AFFINITY] = "SIMCALL_VM_SET_AFFINITY",
-[SIMCALL_VM_DESTROY] = "SIMCALL_VM_DESTROY",
-[SIMCALL_VM_SUSPEND] = "SIMCALL_VM_SUSPEND",
-[SIMCALL_VM_RESUME] = "SIMCALL_VM_RESUME",
-[SIMCALL_VM_SHUTDOWN] = "SIMCALL_VM_SHUTDOWN",
-[SIMCALL_VM_SAVE] = "SIMCALL_VM_SAVE",
-[SIMCALL_VM_RESTORE] = "SIMCALL_VM_RESTORE",
-[SIMCALL_PROCESS_CREATE] = "SIMCALL_PROCESS_CREATE",
-[SIMCALL_PROCESS_KILL] = "SIMCALL_PROCESS_KILL",
-[SIMCALL_PROCESS_KILLALL] = "SIMCALL_PROCESS_KILLALL",
-[SIMCALL_PROCESS_CLEANUP] = "SIMCALL_PROCESS_CLEANUP",
-[SIMCALL_PROCESS_CHANGE_HOST] = "SIMCALL_PROCESS_CHANGE_HOST",
-[SIMCALL_PROCESS_SUSPEND] = "SIMCALL_PROCESS_SUSPEND",
-[SIMCALL_PROCESS_RESUME] = "SIMCALL_PROCESS_RESUME",
-[SIMCALL_PROCESS_COUNT] = "SIMCALL_PROCESS_COUNT",
-[SIMCALL_PROCESS_GET_PID] = "SIMCALL_PROCESS_GET_PID",
-[SIMCALL_PROCESS_GET_PPID] = "SIMCALL_PROCESS_GET_PPID",
-[SIMCALL_PROCESS_GET_DATA] = "SIMCALL_PROCESS_GET_DATA",
-[SIMCALL_PROCESS_SET_DATA] = "SIMCALL_PROCESS_SET_DATA",
-[SIMCALL_PROCESS_GET_HOST] = "SIMCALL_PROCESS_GET_HOST",
-[SIMCALL_PROCESS_GET_NAME] = "SIMCALL_PROCESS_GET_NAME",
-[SIMCALL_PROCESS_IS_SUSPENDED] = "SIMCALL_PROCESS_IS_SUSPENDED",
-[SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
-[SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
-[SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
-[SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
-[SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
-[SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
-[SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
-[SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
-[SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
-[SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
-[SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
-[SIMCALL_RDV_GET_RECEIVER] = "SIMCALL_RDV_GET_RECEIVER",
-[SIMCALL_COMM_IPROBE] = "SIMCALL_COMM_IPROBE",
-[SIMCALL_COMM_SEND] = "SIMCALL_COMM_SEND",
-[SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
-[SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
-[SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
-[SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
-[SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
-[SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
-[SIMCALL_COMM_TEST] = "SIMCALL_COMM_TEST",
-[SIMCALL_COMM_TESTANY] = "SIMCALL_COMM_TESTANY",
-[SIMCALL_COMM_GET_REMAINS] = "SIMCALL_COMM_GET_REMAINS",
-[SIMCALL_COMM_GET_STATE] = "SIMCALL_COMM_GET_STATE",
-[SIMCALL_COMM_GET_SRC_DATA] = "SIMCALL_COMM_GET_SRC_DATA",
-[SIMCALL_COMM_GET_DST_DATA] = "SIMCALL_COMM_GET_DST_DATA",
-[SIMCALL_COMM_GET_SRC_PROC] = "SIMCALL_COMM_GET_SRC_PROC",
-[SIMCALL_COMM_GET_DST_PROC] = "SIMCALL_COMM_GET_DST_PROC",
-[SIMCALL_MUTEX_INIT] = "SIMCALL_MUTEX_INIT",
-[SIMCALL_MUTEX_DESTROY] = "SIMCALL_MUTEX_DESTROY",
-[SIMCALL_MUTEX_LOCK] = "SIMCALL_MUTEX_LOCK",
-[SIMCALL_MUTEX_TRYLOCK] = "SIMCALL_MUTEX_TRYLOCK",
-[SIMCALL_MUTEX_UNLOCK] = "SIMCALL_MUTEX_UNLOCK",
-[SIMCALL_COND_INIT] = "SIMCALL_COND_INIT",
-[SIMCALL_COND_DESTROY] = "SIMCALL_COND_DESTROY",
-[SIMCALL_COND_SIGNAL] = "SIMCALL_COND_SIGNAL",
-[SIMCALL_COND_WAIT] = "SIMCALL_COND_WAIT",
-[SIMCALL_COND_WAIT_TIMEOUT] = "SIMCALL_COND_WAIT_TIMEOUT",
-[SIMCALL_COND_BROADCAST] = "SIMCALL_COND_BROADCAST",
-[SIMCALL_SEM_INIT] = "SIMCALL_SEM_INIT",
-[SIMCALL_SEM_DESTROY] = "SIMCALL_SEM_DESTROY",
-[SIMCALL_SEM_RELEASE] = "SIMCALL_SEM_RELEASE",
-[SIMCALL_SEM_WOULD_BLOCK] = "SIMCALL_SEM_WOULD_BLOCK",
-[SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
-[SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
-[SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
-[SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
-[SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
-[SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
-[SIMCALL_FILE_CLOSE] = "SIMCALL_FILE_CLOSE",
-[SIMCALL_FILE_UNLINK] = "SIMCALL_FILE_UNLINK",
-[SIMCALL_FILE_GET_SIZE] = "SIMCALL_FILE_GET_SIZE",
-[SIMCALL_FILE_TELL] = "SIMCALL_FILE_TELL",
-[SIMCALL_FILE_SEEK] = "SIMCALL_FILE_SEEK",
-[SIMCALL_FILE_GET_INFO] = "SIMCALL_FILE_GET_INFO",
-[SIMCALL_FILE_MOVE] = "SIMCALL_FILE_MOVE",
-[SIMCALL_STORAGE_GET_FREE_SIZE] = "SIMCALL_STORAGE_GET_FREE_SIZE",
-[SIMCALL_STORAGE_GET_USED_SIZE] = "SIMCALL_STORAGE_GET_USED_SIZE",
-[SIMCALL_STORAGE_GET_PROPERTIES] = "SIMCALL_STORAGE_GET_PROPERTIES",
-[SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
-[SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
+  [SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
+  [SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
+  [SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
+  [SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
+  [SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
+  [SIMCALL_HOST_GET_CORE] = "SIMCALL_HOST_GET_CORE",
+  [SIMCALL_HOST_GET_PROCESS_LIST] = "SIMCALL_HOST_GET_PROCESS_LIST",
+  [SIMCALL_HOST_GET_SPEED] = "SIMCALL_HOST_GET_SPEED",
+  [SIMCALL_HOST_GET_AVAILABLE_SPEED] = "SIMCALL_HOST_GET_AVAILABLE_SPEED",
+  [SIMCALL_HOST_GET_STATE] = "SIMCALL_HOST_GET_STATE",
+  [SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
+  [SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
+  [SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
+  [SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
+  [SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
+  [SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
+  [SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
+  [SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY",
+  [SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL",
+  [SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS",
+  [SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE",
+  [SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY",
+  [SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND",
+  [SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY",
+  [SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT",
+  [SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
+  [SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
+  [SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
+  [SIMCALL_HOST_SET_PARAMS] = "SIMCALL_HOST_SET_PARAMS",
+  [SIMCALL_VM_CREATE] = "SIMCALL_VM_CREATE",
+  [SIMCALL_VM_START] = "SIMCALL_VM_START",
+  [SIMCALL_VM_GET_STATE] = "SIMCALL_VM_GET_STATE",
+  [SIMCALL_VM_MIGRATE] = "SIMCALL_VM_MIGRATE",
+  [SIMCALL_VM_GET_PM] = "SIMCALL_VM_GET_PM",
+  [SIMCALL_VM_SET_BOUND] = "SIMCALL_VM_SET_BOUND",
+  [SIMCALL_VM_SET_AFFINITY] = "SIMCALL_VM_SET_AFFINITY",
+  [SIMCALL_VM_DESTROY] = "SIMCALL_VM_DESTROY",
+  [SIMCALL_VM_SUSPEND] = "SIMCALL_VM_SUSPEND",
+  [SIMCALL_VM_RESUME] = "SIMCALL_VM_RESUME",
+  [SIMCALL_VM_SHUTDOWN] = "SIMCALL_VM_SHUTDOWN",
+  [SIMCALL_VM_SAVE] = "SIMCALL_VM_SAVE",
+  [SIMCALL_VM_RESTORE] = "SIMCALL_VM_RESTORE",
+  [SIMCALL_PROCESS_CREATE] = "SIMCALL_PROCESS_CREATE",
+  [SIMCALL_PROCESS_KILL] = "SIMCALL_PROCESS_KILL",
+  [SIMCALL_PROCESS_KILLALL] = "SIMCALL_PROCESS_KILLALL",
+  [SIMCALL_PROCESS_CLEANUP] = "SIMCALL_PROCESS_CLEANUP",
+  [SIMCALL_PROCESS_CHANGE_HOST] = "SIMCALL_PROCESS_CHANGE_HOST",
+  [SIMCALL_PROCESS_SUSPEND] = "SIMCALL_PROCESS_SUSPEND",
+  [SIMCALL_PROCESS_RESUME] = "SIMCALL_PROCESS_RESUME",
+  [SIMCALL_PROCESS_COUNT] = "SIMCALL_PROCESS_COUNT",
+  [SIMCALL_PROCESS_GET_PID] = "SIMCALL_PROCESS_GET_PID",
+  [SIMCALL_PROCESS_GET_PPID] = "SIMCALL_PROCESS_GET_PPID",
+  [SIMCALL_PROCESS_GET_DATA] = "SIMCALL_PROCESS_GET_DATA",
+  [SIMCALL_PROCESS_SET_DATA] = "SIMCALL_PROCESS_SET_DATA",
+  [SIMCALL_PROCESS_GET_HOST] = "SIMCALL_PROCESS_GET_HOST",
+  [SIMCALL_PROCESS_GET_NAME] = "SIMCALL_PROCESS_GET_NAME",
+  [SIMCALL_PROCESS_IS_SUSPENDED] = "SIMCALL_PROCESS_IS_SUSPENDED",
+  [SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
+  [SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
+  [SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
+  [SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
+  [SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
+  [SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
+  [SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
+  [SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
+  [SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
+  [SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
+  [SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
+  [SIMCALL_RDV_GET_RECEIVER] = "SIMCALL_RDV_GET_RECEIVER",
+  [SIMCALL_COMM_IPROBE] = "SIMCALL_COMM_IPROBE",
+  [SIMCALL_COMM_SEND] = "SIMCALL_COMM_SEND",
+  [SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
+  [SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
+  [SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
+  [SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
+  [SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
+  [SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
+  [SIMCALL_COMM_TEST] = "SIMCALL_COMM_TEST",
+  [SIMCALL_COMM_TESTANY] = "SIMCALL_COMM_TESTANY",
+  [SIMCALL_COMM_GET_REMAINS] = "SIMCALL_COMM_GET_REMAINS",
+  [SIMCALL_COMM_GET_STATE] = "SIMCALL_COMM_GET_STATE",
+  [SIMCALL_COMM_GET_SRC_DATA] = "SIMCALL_COMM_GET_SRC_DATA",
+  [SIMCALL_COMM_GET_DST_DATA] = "SIMCALL_COMM_GET_DST_DATA",
+  [SIMCALL_COMM_GET_SRC_PROC] = "SIMCALL_COMM_GET_SRC_PROC",
+  [SIMCALL_COMM_GET_DST_PROC] = "SIMCALL_COMM_GET_DST_PROC",
+  [SIMCALL_MUTEX_INIT] = "SIMCALL_MUTEX_INIT",
+  [SIMCALL_MUTEX_DESTROY] = "SIMCALL_MUTEX_DESTROY",
+  [SIMCALL_MUTEX_LOCK] = "SIMCALL_MUTEX_LOCK",
+  [SIMCALL_MUTEX_TRYLOCK] = "SIMCALL_MUTEX_TRYLOCK",
+  [SIMCALL_MUTEX_UNLOCK] = "SIMCALL_MUTEX_UNLOCK",
+  [SIMCALL_COND_INIT] = "SIMCALL_COND_INIT",
+  [SIMCALL_COND_DESTROY] = "SIMCALL_COND_DESTROY",
+  [SIMCALL_COND_SIGNAL] = "SIMCALL_COND_SIGNAL",
+  [SIMCALL_COND_WAIT] = "SIMCALL_COND_WAIT",
+  [SIMCALL_COND_WAIT_TIMEOUT] = "SIMCALL_COND_WAIT_TIMEOUT",
+  [SIMCALL_COND_BROADCAST] = "SIMCALL_COND_BROADCAST",
+  [SIMCALL_SEM_INIT] = "SIMCALL_SEM_INIT",
+  [SIMCALL_SEM_DESTROY] = "SIMCALL_SEM_DESTROY",
+  [SIMCALL_SEM_RELEASE] = "SIMCALL_SEM_RELEASE",
+  [SIMCALL_SEM_WOULD_BLOCK] = "SIMCALL_SEM_WOULD_BLOCK",
+  [SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
+  [SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
+  [SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
+  [SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
+  [SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
+  [SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
+  [SIMCALL_FILE_CLOSE] = "SIMCALL_FILE_CLOSE",
+  [SIMCALL_FILE_UNLINK] = "SIMCALL_FILE_UNLINK",
+  [SIMCALL_FILE_GET_SIZE] = "SIMCALL_FILE_GET_SIZE",
+  [SIMCALL_FILE_TELL] = "SIMCALL_FILE_TELL",
+  [SIMCALL_FILE_SEEK] = "SIMCALL_FILE_SEEK",
+  [SIMCALL_FILE_GET_INFO] = "SIMCALL_FILE_GET_INFO",
+  [SIMCALL_FILE_MOVE] = "SIMCALL_FILE_MOVE",
+  [SIMCALL_STORAGE_GET_FREE_SIZE] = "SIMCALL_STORAGE_GET_FREE_SIZE",
+  [SIMCALL_STORAGE_GET_USED_SIZE] = "SIMCALL_STORAGE_GET_USED_SIZE",
+  [SIMCALL_STORAGE_GET_PROPERTIES] = "SIMCALL_STORAGE_GET_PROPERTIES",
+  [SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
+  [SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-[SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
+  [SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
 #endif
 
 #ifdef HAVE_TRACING
-[SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
+  [SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
 #endif
 
 #ifdef HAVE_MC
-[SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
-[SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
-[SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
+  [SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
+  [SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
+  [SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
 #endif
 [SIMCALL_NONE] = "NONE"
 };
@@ -635,7 +635,7 @@ case SIMCALL_COND_BROADCAST:
       break;  
 
 case SIMCALL_SEM_INIT:
-      simcall->result.dp = simcall_HANDLER_sem_init(simcall ,  simcall->args[0].i);
+      simcall->result.dp = simcall_HANDLER_sem_init(simcall ,  simcall->args[0].ui);
       SIMIX_simcall_answer(simcall);
       break;  
 
@@ -761,7 +761,7 @@ case SIMCALL_MC_SNAPSHOT:
       break;  
 
 case SIMCALL_MC_COMPARE_SNAPSHOTS:
-      simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall ,  simcall->args[0].dp,  simcall->args[1].dp);
+      simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall , (mc_snapshot_t) simcall->args[0].dp, (mc_snapshot_t) simcall->args[1].dp);
       SIMIX_simcall_answer(simcall);
       break;  
 
index 3a37ccc..8e0d5dd 100644 (file)
@@ -13,6 +13,7 @@ SG_BEGIN_DECL()
 XBT_PUBLIC(const char*) simcall_names[]; /* Name of each simcall */
 
 #include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
+#include "mc/mc_interface.h" /* Definition of mc_snapshot_t, used by one simcall */
 
 typedef int (*simix_match_func_t)(void *, void *, smx_action_t);
 typedef void (*simix_copy_data_func_t)(smx_action_t, void*, size_t);
@@ -69,8 +70,6 @@ void SIMIX_simcall_answer(smx_simcall_t);
 void SIMIX_simcall_handle(smx_simcall_t, int);
 void SIMIX_simcall_exit(smx_action_t);
 const char *SIMIX_simcall_name(e_smx_simcall_t kind);
-//FIXME put it in a better place
-xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char *name);
 
 SG_END_DECL()
 
index cdd02a8..e211d98 100644 (file)
@@ -25,7 +25,7 @@ host_parallel_execute True (void*, smx_action_t) (name, const char*) (host_nb, i
 host_execution_destroy True (void) (execution, void*, smx_action_t)
 host_execution_cancel True (void) (execution, void*, smx_action_t)
 host_execution_get_remains True (double) (execution, void*, smx_action_t)
-host_execution_get_state True (int) (execution, void*, smx_action_t)
+host_execution_get_state True (int, e_smx_state_t) (execution, void*, smx_action_t)
 host_execution_set_priority True (void) (execution, void*, smx_action_t) (priority, double)
 host_execution_set_bound True (void) (execution, void*, smx_action_t) (bound, double)
 host_execution_set_affinity True (void) (execution, void*, smx_action_t) (ws, void*, smx_host_t) (mask, unsigned long)
@@ -34,7 +34,7 @@ host_get_mounted_storage_list True (void*, xbt_dict_t) (host, void*, smx_host_t)
 host_get_attached_storage_list True (void*, xbt_dynar_t) (host, void*, smx_host_t)
 host_get_params True (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t)
 host_set_params True (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t)
-vm_create True (void*) (name, const char*) (ind_pm, void*, smx_host_t)
+vm_create True (void*, smx_host_t) (name, const char*) (ind_pm, void*, smx_host_t)
 vm_start True (void) (ind_vm, void*, smx_host_t)
 vm_get_state True (int) (ind_vm, void*, smx_host_t)
 vm_migrate True (void) (ind_vm, void*, smx_host_t) (ind_dst_pm, void*, smx_host_t)
@@ -86,7 +86,7 @@ comm_wait False (void) (comm, void*, smx_action_t) (timeout, double)
 comm_test False (int) (comm, void*, smx_action_t)
 comm_testany False (int) (comms, void*, xbt_dynar_t)
 comm_get_remains True (double) (comm, void*, smx_action_t)
-comm_get_state True (int) (comm, void*, smx_action_t)
+comm_get_state True (int, e_smx_state_t) (comm, void*, smx_action_t)
 comm_get_src_data True (void*) (comm, void*, smx_action_t)
 comm_get_dst_data True (void*) (comm, void*, smx_action_t)
 comm_get_src_proc True (void*, smx_process_t) (comm, void*, smx_action_t)
@@ -102,7 +102,7 @@ cond_signal True (void) (cond, void*, smx_cond_t)
 cond_wait False (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t)
 cond_wait_timeout False (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t) (timeout, double)
 cond_broadcast True (void) (cond, void*, smx_cond_t)
-sem_init True (void*, smx_sem_t) (capacity, int)
+sem_init True (void*, smx_sem_t) (capacity, unsigned int)
 sem_destroy True (void) (sem, void*, smx_sem_t)
 sem_release True (void) (sem, void*, smx_sem_t)
 sem_would_block True (int) (sem, void*, smx_sem_t)
@@ -129,6 +129,6 @@ comm_is_latency_bounded True (int) (comm, void*, smx_action_t)
 ## HAVE_TRACING
 set_category True (void) (action, void*, smx_action_t) (category, const char*)
 ## HAVE_MC
-mc_snapshot True (void*)
-mc_compare_snapshots True (int) (s1, void*) (s2, void*)
+mc_snapshot True (void*, mc_snapshot_t)
+mc_compare_snapshots True (int) (s1, void*, mc_snapshot_t) (s2, void*, mc_snapshot_t)
 mc_random True (int) (min, int) (max, int)
index 354dddd..0bed4ec 100755 (executable)
@@ -39,7 +39,7 @@ class Arg(object):
   def field(self):
     return self.simcall_types[self.type]
 
-  def ret(self):
+  def rettype(self):
     return '%s'%self.casted if self.casted else self.type
 
   def cast(self):
@@ -63,7 +63,7 @@ class Simcall(object):
       if self.name not in self.simcalls_BODY:
           print '# ERROR: No function calling simcall_BODY_%s'%self.name
           print '# Add something like this to libsmx.c:'
-          print '%s simcall_%s(%s) {'%(self.res.ret() ,self.name ,', '.join('%s %s'%(arg.ret(), arg.name) for arg in self.args))
+          print '%s simcall_%s(%s) {'%(self.res.rettype() ,self.name ,', '.join('%s %s'%(arg.rettype(), arg.name) for arg in self.args))
           print '  return simcall_BODY_%s(%s);'%(self.name)
           print '}'
           return False
@@ -78,9 +78,9 @@ class Simcall(object):
       if self.name not in self.simcalls_PRE:
           print '# ERROR: No function called simcall_HANDLER_%s'%self.name
           print '# Add something like this to the relevant C file (like smx_io.c if it\'s an IO call):'
-          print '%s simcall_HANDLER_%s(smx_simcall_t simcall%s) {'%(self.res.ret()
+          print '%s simcall_HANDLER_%s(smx_simcall_t simcall%s) {'%(self.res.rettype()
                                                                     ,self.name                                               
-                                                                    ,''.join(', %s %s'%(arg.ret(), arg.name)
+                                                                    ,''.join(', %s %s'%(arg.rettype(), arg.name)
                                                                              for arg in self.args))
           print '  // Your code handling the simcall'
           print '}'
@@ -95,11 +95,21 @@ class Simcall(object):
 
   def accessors(self):
     res = []
+    # Arguments getter/setters
     for i in range(len(self.args)):
-      res.append(self.arg_getter(i))
-      res.append(self.arg_setter(i))
+        arg = self.args[i]
+        res.append('')
+        res.append('static inline %s simcall_%s__get__%s(smx_simcall_t simcall){'%(arg.rettype(), self.name, arg.name))
+        res.append('  return %s simcall->args[%i].%s;'%(arg.cast(), i, arg.field()))
+        res.append('}')
+        res.append('')
+        res.append('static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg){'%(self.name, arg.name, arg.type))
+        res.append('    simcall->args[%i].%s = arg;'%(i, arg.field()))
+        res.append('}')
+      
+    # Return value getter/setters
     if self.res.type != 'void':
-        res.append('static inline %s simcall_%s__get__result(smx_simcall_t simcall){'%(self.res.ret(), self.name))
+        res.append('static inline %s simcall_%s__get__result(smx_simcall_t simcall){'%(self.res.rettype(), self.name))
         res.append('    return %s simcall->result.%s;'%(self.res.cast(), self.res.field()))
         res.append('}')
         res.append('static inline void simcall_%s__set__result(smx_simcall_t simcall, %s result){'%(self.name, self.res.type,))
@@ -107,20 +117,6 @@ class Simcall(object):
         res.append('}')
     return '\n'.join(res)
 
-  def arg_getter(self, i):
-    arg = self.args[i]
-    return '''
-static inline %s simcall_%s__get__%s(smx_simcall_t simcall){
-  return %s simcall->args[%i].%s;
-}'''%(arg.ret(), self.name, arg.name, arg.cast(), i, arg.field())
-
-  def arg_setter(self, i):
-    arg = self.args[i]
-    return '''
-static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg){
-    simcall->args[%i].%s = arg;
-}'''%(self.name, arg.name, arg.type, i, arg.field())
-
   def case(self):
     return '''case SIMCALL_%s:
       %ssimcall_HANDLER_%s(simcall %s);
@@ -153,9 +149,9 @@ inline static %s simcall_BODY_%s(%s) {
       SIMIX_simcall_handle(&self->simcall, 0);
     }    
     %s
-  }'''%(self.res.ret()
+  }'''%(self.res.rettype()
        ,self.name
-       ,', '.join('%s %s'%(arg.ret(), arg.name)
+       ,', '.join('%s %s'%(arg.rettype(), arg.name)
                   for arg in self.args)
        ,self.name
        ,', '.join(["&self->simcall"]+ [arg.name for arg in self.args])
@@ -163,6 +159,10 @@ inline static %s simcall_BODY_%s(%s) {
        ,'\n'.join('    self->simcall.args[%d].%s = (%s) %s;'%(i, arg.field(), arg.type, arg.name)
                   for i, arg in enumerate(self.args))
        ,'' if self.res.type == 'void' else 'return self->simcall.result.%s;'%self.res.field())
+  
+  def handler_prototype(self):
+      return "%s simcall_HANDLER_%s(smx_simcall_t simcall%s);"%(self.res.rettype() if self.has_answer else 'void', self.name, ''.join(', %s %s'%(arg.rettype(), arg.name) 
+             for i, arg in enumerate(self.args)))
 
 def parse(fn):
   simcalls = []
@@ -229,6 +229,8 @@ if __name__=='__main__':
   ###
   fd = header('popping_accessors.h')
   handle(fd, Simcall.accessors, simcalls, simcalls_dict)
+  fd.write("\n\n/* The prototype of all simcall handlers, automatically generated for you */\n\n")
+  handle(fd, Simcall.handler_prototype, simcalls, simcalls_dict)
   fd.close()
 
   ###
index a98b38b..ce45c16 100644 (file)
@@ -181,9 +181,6 @@ smx_host_t SIMIX_host_self(void)
   return (process == NULL) ? NULL : SIMIX_process_get_host(process);
 }
 
-const char* simcall_HANDLER_host_self_get_name(smx_simcall_t simcall){
-   return SIMIX_host_self_get_name();
-}
 /* needs to be public and without simcall because it is called
    by exceptions and logging events */
 const char* SIMIX_host_self_get_name(void)
index f9de66b..7c37f7f 100644 (file)
@@ -65,95 +65,47 @@ 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_host_execution_set_bound(smx_action_t action, double bound);
 void SIMIX_host_execution_set_affinity(smx_action_t action, smx_host_t host, unsigned long mask);
-void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_action_t action);
 xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host);
 xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host);
-// handlers' prototypes
-smx_host_t simcall_HANDLER_host_get_by_name(smx_simcall_t, const char*);
-const char* simcall_HANDLER_host_self_get_name(smx_simcall_t);
-const char* simcall_HANDLER_host_get_name(smx_simcall_t, smx_host_t);
-void simcall_HANDLER_host_on(smx_simcall_t, smx_host_t host);
-void simcall_HANDLER_host_off(smx_simcall_t, smx_host_t host);
-xbt_dict_t simcall_HANDLER_host_get_properties(smx_simcall_t, smx_host_t);
-int simcall_HANDLER_host_get_core(smx_simcall_t, smx_host_t);
-xbt_swag_t simcall_HANDLER_host_get_process_list(smx_simcall_t, smx_host_t host);
-double simcall_HANDLER_host_get_speed(smx_simcall_t, smx_host_t);
-double simcall_HANDLER_host_get_available_speed(smx_simcall_t, smx_host_t);
-int simcall_HANDLER_host_get_state(smx_simcall_t, smx_host_t);
-double simcall_HANDLER_host_get_current_power_peak(smx_simcall_t, smx_host_t);
-double simcall_HANDLER_host_get_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index);
-int simcall_HANDLER_host_get_nb_pstates(smx_simcall_t, smx_host_t host);
-void simcall_HANDLER_host_set_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index);
-double simcall_HANDLER_host_get_consumed_energy(smx_simcall_t, smx_host_t);
-void* simcall_HANDLER_host_self_get_data(smx_simcall_t);
-smx_action_t simcall_HANDLER_host_execute(smx_simcall_t, const char*, smx_host_t, double, double, double, unsigned long);
-smx_action_t simcall_HANDLER_host_parallel_execute(smx_simcall_t, const char*, int, smx_host_t*,
-                                             double*, double*, double, double);
-void simcall_HANDLER_host_execution_destroy(smx_simcall_t, smx_action_t);
-void simcall_HANDLER_host_execution_cancel(smx_simcall_t, smx_action_t);
-double simcall_HANDLER_host_execution_get_remains(smx_simcall_t, smx_action_t);
-e_smx_state_t simcall_HANDLER_host_execution_get_state(smx_simcall_t, smx_action_t);
-void simcall_HANDLER_host_execution_set_priority(smx_simcall_t, smx_action_t, double);
-void simcall_HANDLER_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action, double bound);
-void simcall_HANDLER_host_execution_set_affinity(smx_simcall_t simcall, smx_action_t action, smx_host_t host, unsigned long mask);
 
 void SIMIX_host_execution_suspend(smx_action_t action);
 void SIMIX_host_execution_resume(smx_action_t action);
 
 void SIMIX_post_host_execute(smx_action_t action);
-xbt_dict_t simcall_HANDLER_host_get_mounted_storage_list(smx_simcall_t, smx_host_t);
-xbt_dynar_t simcall_HANDLER_host_get_attached_storage_list(smx_simcall_t, smx_host_t);
 #ifdef HAVE_TRACING
-void simcall_HANDLER_set_category(smx_simcall_t simcall, smx_action_t action,
-                           const char *category);
 void SIMIX_set_category(smx_action_t action, const char *category);
 #endif
 /* vm related stuff */
 smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host);
-smx_host_t simcall_HANDLER_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host);
 
 void SIMIX_vm_destroy(smx_host_t ind_vm);
-void simcall_HANDLER_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer);
-void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer);
-void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer);
-void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer);
-void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_start(smx_host_t ind_vm);
-void simcall_HANDLER_vm_start(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer);
-void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 
 int SIMIX_vm_get_state(smx_host_t ind_vm);
-int simcall_HANDLER_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm);
-void simcall_HANDLER_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm);
 
 void *SIMIX_vm_get_pm(smx_host_t ind_vm);
-void *simcall_HANDLER_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound);
-void simcall_HANDLER_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound);
 
 void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask);
-void simcall_HANDLER_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask);
 
 void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params);
-void simcall_HANDLER_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
 
 void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params);
-void simcall_HANDLER_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
 
 SG_END_DECL()
 
index 962b85f..8cdcf42 100644 (file)
@@ -294,10 +294,6 @@ xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
   return surf_resource_get_properties(surf_storage_resource_priv(storage));
 }
 
-const char* simcall_HANDLER_storage_get_name(smx_simcall_t simcall, smx_storage_t storage){
-   return SIMIX_storage_get_name(storage);
-}
-
 const char* SIMIX_storage_get_name(smx_storage_t storage){
   xbt_assert((storage != NULL), "Invalid parameters");
   return sg_storage_name(storage);
@@ -312,10 +308,6 @@ xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage){
   return surf_storage_get_content(storage);
 }
 
-const char* simcall_HANDLER_storage_get_host(smx_simcall_t simcall, smx_storage_t storage){
-   return SIMIX_storage_get_host(storage);
-}
-
 const char* SIMIX_storage_get_host(smx_storage_t storage){
   xbt_assert((storage != NULL), "Invalid parameters");
   return surf_storage_get_host(storage);
index fd49978..4056669 100644 (file)
@@ -22,16 +22,6 @@ static inline smx_storage_priv_t SIMIX_storage_priv(smx_storage_t storage){
 
 smx_storage_t SIMIX_storage_create(const char *name, void *storage, void *data);
 void SIMIX_storage_destroy(void *s);
-void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host);
-void simcall_HANDLER_file_write(smx_simcall_t simcall,smx_file_t fd, sg_size_t size, smx_host_t host);
-void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host);
-void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
-int simcall_HANDLER_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
-sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd);
-sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd);
-xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd);
-int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin);
-int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath);
 smx_action_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host);
 smx_action_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host);
 smx_action_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_host_t host);
@@ -43,20 +33,13 @@ xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd);
 int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin);
 int SIMIX_file_move(smx_process_t process, smx_file_t fd, const char* fullpath);
 
-sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall,smx_storage_t storage);
 sg_size_t SIMIX_storage_get_free_size(smx_process_t process,smx_storage_t storage);
-
-sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall,smx_storage_t storage);
 sg_size_t SIMIX_storage_get_used_size(smx_process_t process,smx_storage_t storage);
 
 xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage);
-xbt_dict_t simcall_HANDLER_storage_get_properties(smx_simcall_t, smx_storage_t);
 
-xbt_dict_t simcall_HANDLER_storage_get_content(smx_simcall_t simcall, smx_storage_t storage);
 xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage);
 
-const char* simcall_HANDLER_storage_get_name(smx_simcall_t simcall, smx_storage_t storage);
-const char* simcall_HANDLER_storage_get_host(smx_simcall_t simcall, smx_storage_t storage);
 void SIMIX_post_io(smx_action_t action);
 void SIMIX_io_destroy(smx_action_t action);
 void SIMIX_io_finish(smx_action_t action);
index 6e2e16f..7c0b9ff 100644 (file)
@@ -92,15 +92,12 @@ xbt_dict_t SIMIX_get_rdv_points()
   return rdv_points;
 }
 
-smx_rdv_t simcall_HANDLER_rdv_get_by_name(smx_simcall_t simcall, const char *name){
-  return SIMIX_rdv_get_by_name(name);
-}
 smx_rdv_t SIMIX_rdv_get_by_name(const char *name)
 {
   return xbt_dict_get_or_null(rdv_points, name);
 }
 
-int simcall_HANDLER_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host){
+unsigned int simcall_HANDLER_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host){
   return SIMIX_rdv_comm_count_by_host(rdv, host);
 }
 int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
index 18e68c2..1132798 100644 (file)
@@ -51,11 +51,7 @@ void SIMIX_comm_destroy(smx_action_t action);
 void SIMIX_comm_destroy_internal_actions(smx_action_t action);
 smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src,
                               int tag, int (*match_fun)(void *, void *, smx_action_t), void *data);
-void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout);
-void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions);
 void SIMIX_post_comm(smx_action_t action);
-void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_action_t action);
-void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions);
 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);
@@ -64,51 +60,5 @@ void SIMIX_comm_resume(smx_action_t action);
 smx_process_t SIMIX_comm_get_src_proc(smx_action_t action);
 smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action);
 
-// handlers' prototypes
-smx_action_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, 
-                                   int type,int src, int tag,
-                                   int (*match_fun)(void *, void *, smx_action_t),
-                                   void *data);
-smx_rdv_t simcall_HANDLER_rdv_create(smx_simcall_t simcall, const char *name);
-void simcall_HANDLER_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv);
-smx_rdv_t simcall_HANDLER_rdv_get_by_name(smx_simcall_t simcall, const char *name);
-int simcall_HANDLER_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host);
-smx_action_t simcall_HANDLER_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv);
-smx_process_t simcall_HANDLER_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv);
-void simcall_HANDLER_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv,
-                           smx_process_t process);
-void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
-                                  double task_size, double rate,
-                                  void *src_buff, size_t src_buff_size,
-                                  int (*match_fun)(void *, void *,smx_action_t),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
-                                 void *data, double timeout);
-smx_action_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
-                                  double task_size, double rate,
-                                  void *src_buff, size_t src_buff_size,
-                                  int (*match_fun)(void *, void *,smx_action_t),
-                                  void (*clean_fun)(void *), 
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
-                                 void *data, int detached);
-void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
-                         void *dst_buff, size_t *dst_buff_size,
-                         int (*match_fun)(void *, void *, smx_action_t),
-                         void (*copy_data_fun)(smx_action_t, void*, size_t),
-                         void *data, double timeout, double rate);
-smx_action_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
-                                  void *dst_buff, size_t *dst_buff_size,
-                                  int (*match_fun)(void *, void *, smx_action_t),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
-                                 void *data, double rate);
-void simcall_HANDLER_comm_cancel(smx_simcall_t simcall, smx_action_t action);
-double simcall_HANDLER_comm_get_remains(smx_simcall_t simcall, smx_action_t action);
-e_smx_state_t simcall_HANDLER_comm_get_state(smx_simcall_t simcall, smx_action_t action);
-void* simcall_HANDLER_comm_get_src_data(smx_simcall_t simcall, smx_action_t action);
-void* simcall_HANDLER_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action);
-smx_process_t simcall_HANDLER_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action);
-smx_process_t simcall_HANDLER_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-int simcall_HANDLER_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action);
-#endif
 #endif
 
index 30ff57c..6bae05d 100644 (file)
@@ -618,10 +618,6 @@ int SIMIX_process_get_PPID(smx_process_t self){
     return self->ppid;
 }
 
-void* simcall_HANDLER_process_self_get_data(smx_simcall_t simcall, smx_process_t self){
-  return SIMIX_process_self_get_data(self);
-}
-
 void* SIMIX_process_self_get_data(smx_process_t self)
 {
   xbt_assert(self == SIMIX_process_self(), "This is not the current process");
index 246b37b..0bfd113 100644 (file)
@@ -84,11 +84,8 @@ void SIMIX_process_empty_trash(void);
 void SIMIX_process_yield(smx_process_t self);
 xbt_running_ctx_t *SIMIX_process_get_running_context(void);
 void SIMIX_process_exception_terminate(xbt_ex_t * e);
-void simcall_HANDLER_process_change_host(smx_simcall_t, smx_process_t process,
-           smx_host_t dest);
 void SIMIX_process_change_host(smx_process_t process,
              smx_host_t dest);
-void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process);
 smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer);
 void SIMIX_process_resume(smx_process_t process, smx_process_t issuer);
 int SIMIX_process_get_PID(smx_process_t self);
@@ -100,9 +97,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 simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout);
 smx_action_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout);
-void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
 smx_action_t SIMIX_process_sleep(smx_process_t process, double duration);
 void SIMIX_post_process_sleep(smx_action_t action);
 
@@ -112,32 +107,6 @@ void SIMIX_process_sleep_destroy(smx_action_t action);
 void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart);
 smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer);
 
-// handlers' prototypes
-void simcall_HANDLER_process_create(smx_simcall_t simcall, smx_process_t *process,
-                             const char *name, xbt_main_func_t code, void *data,
-                             const char *hostname, double kill_time, int argc,
-                             char **argv, xbt_dict_t properties, int auto_restart);
-void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process);
-void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid);
-void simcall_HANDLER_process_cleanup(smx_simcall_t simcall, smx_process_t process);
-void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process);
-int simcall_HANDLER_process_count(smx_simcall_t simcall);
-void* simcall_HANDLER_process_self_get_data(smx_simcall_t simcall, smx_process_t process);
-int simcall_HANDLER_process_get_PID(smx_simcall_t simcall, smx_process_t self);
-int simcall_HANDLER_process_get_PPID(smx_simcall_t simcall, smx_process_t self);
-void* simcall_HANDLER_process_get_data(smx_simcall_t simcall, smx_process_t process);
-void simcall_HANDLER_process_set_data(smx_simcall_t simcall, smx_process_t process,
-                                void *data);
-smx_host_t simcall_HANDLER_process_get_host(smx_simcall_t simcall, smx_process_t process);
-const char* simcall_HANDLER_process_get_name(smx_simcall_t simcall, smx_process_t process);
-int simcall_HANDLER_process_is_suspended(smx_simcall_t simcall, smx_process_t process);
-xbt_dict_t simcall_HANDLER_process_get_properties(smx_simcall_t simcall, smx_process_t process);
-void simcall_HANDLER_process_on_exit(smx_simcall_t simcall, smx_process_t process,
-                              int_f_pvoid_pvoid_t fun, void *data);
-void simcall_HANDLER_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
-                                       int auto_restart);
-smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process);
-
 SG_END_DECL()
 
 #endif
index d2028e8..66005c3 100644 (file)
@@ -527,3 +527,6 @@ void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, d
   _SIMIX_sem_wait(sem, timeout, simcall->issuer, simcall);  
   XBT_OUT();
 }
+int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem) {
+  return SIMIX_sem_would_block(sem);
+}
index 42af51d..d28ecf3 100644 (file)
@@ -32,42 +32,18 @@ void SIMIX_synchro_destroy(smx_action_t action);
 
 smx_mutex_t SIMIX_mutex_init(void);
 void SIMIX_mutex_destroy(smx_mutex_t mutex);
-void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex);
 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 simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex);
-void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond,
-                                smx_mutex_t mutex, double timeout);
 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 simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem);
-void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout);
 int SIMIX_sem_get_capacity(smx_sem_t sem);
 
-// handlers prototypes
-smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall);
-void simcall_HANDLER_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex);
-int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex);
-void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex);
-smx_cond_t simcall_HANDLER_cond_init(smx_simcall_t simcall);
-void simcall_HANDLER_cond_destroy(smx_simcall_t simcall, smx_cond_t cond);
-void simcall_HANDLER_cond_signal(smx_simcall_t simcall, smx_cond_t cond);
-void simcall_HANDLER_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond);
-smx_sem_t simcall_HANDLER_sem_init(smx_simcall_t simcall, unsigned int value);
-void simcall_HANDLER_sem_destroy(smx_simcall_t simcall, smx_sem_t sem);
-void simcall_HANDLER_sem_release(smx_simcall_t simcall, smx_sem_t sem);
-static XBT_INLINE int simcall_HANDLER_sem_would_block(smx_simcall_t simcall,
-                                                smx_sem_t sem)
-{
-  return SIMIX_sem_would_block(sem);
-}
-int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem);
 #endif