From f9df6a0ce7023e4e22d83bb6c50f27bd21fab329 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Wed, 3 Aug 2016 09:52:41 +0200 Subject: [PATCH] track all the useless void --- include/simgrid/host.h | 6 +- include/simgrid/instr.h | 18 +++--- include/simgrid/link.h | 6 +- include/simgrid/msg.h | 34 +++++----- include/simgrid/plugins/energy.h | 2 +- include/simgrid/simdag.h | 4 +- include/simgrid/simix.h | 41 ++++++------ include/smpi/smpi.h | 30 ++++----- include/xbt/automaton.h | 2 +- include/xbt/backtrace.h | 2 +- include/xbt/config.h | 6 +- include/xbt/cunit.h | 8 +-- include/xbt/dict.h | 2 +- include/xbt/fifo.h | 6 +- include/xbt/lib.h | 2 +- include/xbt/misc.h | 2 +- include/xbt/replay.h | 6 +- include/xbt/strbuff.h | 2 +- include/xbt/synchro_core.h | 4 +- include/xbt/sysdep.h | 4 +- include/xbt/xbt_os_thread.h | 14 ++--- include/xbt/xbt_os_time.h | 6 +- src/bindings/java/jmsg.h | 6 +- src/include/instr/instr_interface.h | 8 +-- src/include/mc/mc.h | 8 +-- src/include/simgrid/sg_config.h | 2 +- src/include/smpi/smpi_interface.h | 4 +- src/include/surf/surf.h | 50 +++++++-------- src/instr/instr_interface.cpp | 8 +-- src/instr/instr_paje_types.cpp | 2 +- src/instr/instr_private.h | 96 ++++++++++++++--------------- src/kernel/context/Context.cpp | 4 +- src/kernel/context/Context.hpp | 18 +++--- src/mc/Client.hpp | 2 +- src/mc/mc_base.h | 2 +- src/mc/mc_replay.h | 2 +- src/msg/instr_msg_task.cpp | 4 +- src/msg/msg_environment.cpp | 2 +- src/msg/msg_io.cpp | 2 +- src/msg/msg_private.h | 6 +- src/msg/msg_process.cpp | 12 ++-- src/simdag/sd_daxloader.cpp | 2 +- src/simgrid/host.cpp | 4 +- src/simgrid/sg_config.cpp | 2 +- src/simix/ActorImpl.hpp | 4 +- src/simix/libsmx.cpp | 6 +- src/simix/smx_context.cpp | 16 ++--- src/simix/smx_deployment.cpp | 10 ++- src/simix/smx_environment.cpp | 5 +- src/simix/smx_global.cpp | 12 ++-- src/simix/smx_host.cpp | 4 +- src/simix/smx_network.cpp | 2 +- src/simix/smx_network_private.h | 2 +- src/simix/smx_private.h | 2 +- src/simix/smx_synchro.cpp | 5 +- src/simix/smx_synchro_private.h | 2 +- src/smpi/instr_smpi.cpp | 4 +- src/smpi/smpi_bench.cpp | 10 +-- src/smpi/smpi_coll.cpp | 31 +++------- src/smpi/smpi_f77.cpp | 4 +- src/smpi/smpi_memory.cpp | 2 +- src/smpi/smpi_pmpi.cpp | 6 +- src/smpi/smpi_static_variables.cpp | 2 +- src/surf/host_clm03.cpp | 2 +- src/surf/instr_routing.cpp | 4 +- src/surf/instr_surf.cpp | 4 +- src/surf/maxmin.cpp | 4 +- src/surf/network_cm02.cpp | 10 +-- src/surf/network_ib.cpp | 2 +- src/surf/network_interface.cpp | 6 +- src/surf/network_smpi.cpp | 3 +- src/surf/plugins/energy.cpp | 2 +- src/surf/ptask_L07.cpp | 2 +- src/surf/sg_platf.cpp | 4 +- src/surf/storage_n11.cpp | 2 +- src/surf/surf_c_bindings.cpp | 2 +- src/surf/surf_interface.cpp | 6 +- src/surf/surf_private.h | 6 +- src/surf/surf_routing.cpp | 2 +- src/surf/surf_routing.hpp | 2 +- src/surf/trace_mgr.cpp | 4 +- src/surf/vm_hl13.cpp | 2 +- src/surf/xml/platf.hpp | 7 +-- src/surf/xml/platf_private.hpp | 25 ++++---- src/xbt/backtrace.cpp | 7 +-- src/xbt/backtrace_linux.cpp | 4 +- src/xbt/config.cpp | 6 +- src/xbt/cunit.cpp | 6 +- src/xbt/dict.cpp | 12 ++-- src/xbt/dict_private.h | 4 +- src/xbt/xbt_replay.cpp | 6 +- src/xbt_modinter.h | 24 ++++---- 92 files changed, 362 insertions(+), 390 deletions(-) diff --git a/include/simgrid/host.h b/include/simgrid/host.h index 45d28b72b8..fa19b46ead 100644 --- a/include/simgrid/host.h +++ b/include/simgrid/host.h @@ -16,14 +16,14 @@ SG_BEGIN_DECL() -XBT_PUBLIC(size_t) sg_host_count(void); -XBT_PUBLIC(sg_host_t *) sg_host_list(void); +XBT_PUBLIC(size_t) sg_host_count(); +XBT_PUBLIC(sg_host_t *) sg_host_list(); XBT_PUBLIC(size_t) sg_host_extension_create(void(*deleter)(void*)); XBT_PUBLIC(void*) sg_host_extension_get(sg_host_t host, size_t rank); XBT_PUBLIC(sg_host_t) sg_host_by_name(const char *name); XBT_PUBLIC(const char*) sg_host_get_name(sg_host_t host); -XBT_PUBLIC(xbt_dynar_t) sg_hosts_as_dynar(void); +XBT_PUBLIC(xbt_dynar_t) sg_hosts_as_dynar(); // ========== User Data ============== XBT_PUBLIC(void*) sg_host_user(sg_host_t host); diff --git a/include/simgrid/instr.h b/include/simgrid/instr.h index ead4ebb0b1..f8d60be53f 100644 --- a/include/simgrid/instr.h +++ b/include/simgrid/instr.h @@ -19,7 +19,7 @@ SG_BEGIN_DECL() /* Functions to manage tracing categories */ XBT_PUBLIC(void) TRACE_category(const char *category); XBT_PUBLIC(void) TRACE_category_with_color (const char *category, const char *color); -XBT_PUBLIC(xbt_dynar_t) TRACE_get_categories (void); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_categories (); XBT_PUBLIC(void) TRACE_smpi_set_category(const char *category); /* Functions to manage tracing marks (used for trace comparison experiments) */ @@ -27,7 +27,7 @@ XBT_PUBLIC(void) TRACE_declare_mark(const char *mark_type); XBT_PUBLIC(void) TRACE_declare_mark_value_with_color (const char *mark_type, const char *mark_value, const char *mark_color); XBT_PUBLIC(void) TRACE_declare_mark_value (const char *mark_type, const char *mark_value); XBT_PUBLIC(void) TRACE_mark(const char *mark_type, const char *mark_value); -XBT_PUBLIC(xbt_dynar_t) TRACE_get_marks (void); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_marks (); /* Function used by graphicator (transform a SimGrid platform file in a graphviz dot file with the network topology) */ XBT_PUBLIC(int) TRACE_platform_graph_export_graphviz (const char *filename); @@ -42,7 +42,7 @@ XBT_PUBLIC(void) TRACE_vm_variable_sub (const char *vm, const char *variable, do XBT_PUBLIC(void) TRACE_vm_variable_set_with_time (double time, const char *vm, const char *variable, double value); XBT_PUBLIC(void) TRACE_vm_variable_add_with_time (double time, const char *vm, const char *variable, double value); XBT_PUBLIC(void) TRACE_vm_variable_sub_with_time (double time, const char *vm, const char *variable, double value); -XBT_PUBLIC(xbt_dynar_t) TRACE_get_vm_variables (void); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_vm_variables (); /* for host variables */ XBT_PUBLIC(void) TRACE_host_variable_declare (const char *variable); @@ -53,7 +53,7 @@ XBT_PUBLIC(void) TRACE_host_variable_sub (const char *host, const char *variable XBT_PUBLIC(void) TRACE_host_variable_set_with_time (double time, const char *host, const char *variable, double value); XBT_PUBLIC(void) TRACE_host_variable_add_with_time (double time, const char *host, const char *variable, double value); XBT_PUBLIC(void) TRACE_host_variable_sub_with_time (double time, const char *host, const char *variable, double value); -XBT_PUBLIC(xbt_dynar_t) TRACE_get_host_variables (void); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_host_variables (); /* for link variables */ XBT_PUBLIC(void) TRACE_link_variable_declare (const char *var); @@ -72,7 +72,7 @@ XBT_PUBLIC(void) TRACE_link_srcdst_variable_sub (const char *src, const char *ds XBT_PUBLIC(void) TRACE_link_srcdst_variable_set_with_time (double time, const char *src, const char *dst, const char *variable, double value); XBT_PUBLIC(void) TRACE_link_srcdst_variable_add_with_time (double time, const char *src, const char *dst, const char *variable, double value); XBT_PUBLIC(void) TRACE_link_srcdst_variable_sub_with_time (double time, const char *src, const char *dst, const char *variable, double value); -XBT_PUBLIC(xbt_dynar_t) TRACE_get_link_variables (void); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_link_variables (); XBT_PUBLIC(void) TRACE_host_state_declare (const char *state); XBT_PUBLIC(void) TRACE_host_state_declare_value (const char *state, const char *value, const char *color); XBT_PUBLIC(void) TRACE_host_set_state (const char *host, const char *state, const char *value); @@ -81,10 +81,10 @@ XBT_PUBLIC(void) TRACE_host_pop_state (const char *host, const char *state); XBT_PUBLIC(void) TRACE_host_reset_state (const char *host, const char *state); /* for creating graph configuration files for Viva by hand */ -XBT_PUBLIC(xbt_dynar_t) TRACE_get_node_types (void); -XBT_PUBLIC(xbt_dynar_t) TRACE_get_edge_types (void); -XBT_PUBLIC(void) TRACE_pause (void); -XBT_PUBLIC(void) TRACE_resume (void); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_node_types (); +XBT_PUBLIC(xbt_dynar_t) TRACE_get_edge_types (); +XBT_PUBLIC(void) TRACE_pause (); +XBT_PUBLIC(void) TRACE_resume (); SG_END_DECL() diff --git a/include/simgrid/link.h b/include/simgrid/link.h index 39b6f316e2..4865236afe 100644 --- a/include/simgrid/link.h +++ b/include/simgrid/link.h @@ -20,9 +20,9 @@ XBT_PUBLIC(double) sg_link_bandwidth(Link *link); XBT_PUBLIC(double) sg_link_latency(Link *link); XBT_PUBLIC(void*) sg_link_data(Link *link); XBT_PUBLIC(void) sg_link_data_set(Link *link,void *data); -XBT_PUBLIC(int) sg_link_count(void); -XBT_PUBLIC(Link**) sg_link_list(void); -XBT_PUBLIC(void) sg_link_exit(void); +XBT_PUBLIC(int) sg_link_count(); +XBT_PUBLIC(Link**) sg_link_list(); +XBT_PUBLIC(void) sg_link_exit(); SG_END_DECL() #endif /* INCLUDE_SIMGRID_LINK_H_ */ diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index f12e73ff73..95f014ffd2 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -179,7 +179,7 @@ XBT_PUBLIC(void) MSG_config(const char *key, const char *value); } while (0) XBT_PUBLIC(void) MSG_init_nocheck(int *argc, char **argv); -XBT_PUBLIC(msg_error_t) MSG_main(void); +XBT_PUBLIC(msg_error_t) MSG_main();; XBT_PUBLIC(void) MSG_function_register(const char *name, xbt_main_func_t code); XBT_PUBLIC(void) MSG_function_register_default(xbt_main_func_t code); @@ -189,11 +189,11 @@ XBT_PUBLIC(void) MSG_set_function(const char *host_id, const char *function_name, xbt_dynar_t arguments); -XBT_PUBLIC(double) MSG_get_clock(void); -XBT_PUBLIC(unsigned long int) MSG_get_sent_msg(void); +XBT_PUBLIC(double) MSG_get_clock(); +XBT_PUBLIC(unsigned long int) MSG_get_sent_msg(); /************************** Environment ***********************************/ -XBT_PUBLIC(msg_as_t) MSG_environment_get_routing_root(void); +XBT_PUBLIC(msg_as_t) MSG_environment_get_routing_root(); XBT_PUBLIC(const char *) MSG_environment_as_get_name(msg_as_t as); XBT_PUBLIC(msg_as_t) MSG_environment_as_get_by_name(const char * name); XBT_PUBLIC(xbt_dict_t) MSG_environment_as_get_routing_sons(msg_as_t as); @@ -226,7 +226,7 @@ XBT_PUBLIC(msg_storage_t) MSG_storage_get_by_name(const char *name); XBT_PUBLIC(xbt_dict_t) MSG_storage_get_properties(msg_storage_t storage); XBT_PUBLIC(void) MSG_storage_set_property_value(msg_storage_t storage, const char *name, char *value,void_f_pvoid_t free_ctn); XBT_PUBLIC(const char *)MSG_storage_get_property_value(msg_storage_t storage, const char *name); -XBT_PUBLIC(xbt_dynar_t) MSG_storages_as_dynar(void); +XBT_PUBLIC(xbt_dynar_t) MSG_storages_as_dynar(); XBT_PUBLIC(msg_error_t) MSG_storage_set_data(msg_storage_t host, void *data); XBT_PUBLIC(void *) MSG_storage_get_data(msg_storage_t storage); XBT_PUBLIC(xbt_dict_t) MSG_storage_get_content(msg_storage_t storage); @@ -249,7 +249,7 @@ XBT_PUBLIC(void *) MSG_host_get_data(msg_host_t host); #define MSG_host_get_name(host) sg_host_get_name(host) XBT_PUBLIC(void) MSG_host_on(msg_host_t host); XBT_PUBLIC(void) MSG_host_off(msg_host_t host); -XBT_PUBLIC(msg_host_t) MSG_host_self(void); +XBT_PUBLIC(msg_host_t) MSG_host_self(); XBT_PUBLIC(double) MSG_host_get_speed(msg_host_t h); XBT_PUBLIC(int) MSG_host_get_core_number(msg_host_t h); XBT_PUBLIC(xbt_swag_t) MSG_host_get_process_list(msg_host_t h); @@ -265,8 +265,8 @@ XBT_PUBLIC(double) MSG_host_get_current_power_peak(msg_host_t h); XBT_PUBLIC(int) MSG_host_get_nb_pstates(msg_host_t h); #define MSG_host_get_pstate(h) sg_host_get_pstate(h) #define MSG_host_set_pstate(h, pstate) sg_host_set_pstate(h, pstate) -XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar(void); -XBT_PUBLIC(int) MSG_get_host_number(void); +XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar(); +XBT_PUBLIC(int) MSG_get_host_number(); XBT_PUBLIC(void) MSG_host_get_params(msg_host_t ind_pm, vm_params_t params); XBT_PUBLIC(void) MSG_host_set_params(msg_host_t ind_pm, vm_params_t params); XBT_PUBLIC(xbt_dict_t) MSG_host_get_mounted_storage_list(msg_host_t host); @@ -307,7 +307,7 @@ XBT_PUBLIC(msg_process_t) MSG_process_create_with_environment(const char XBT_PUBLIC(msg_process_t) MSG_process_attach( const char *name, void *data, msg_host_t host, xbt_dict_t properties); -XBT_PUBLIC(void) MSG_process_detach(void); +XBT_PUBLIC(void) MSG_process_detach(); XBT_PUBLIC(void) MSG_process_kill(msg_process_t process); XBT_PUBLIC(int) MSG_process_killall(int reset_PIDs); @@ -322,11 +322,11 @@ XBT_PUBLIC(msg_process_t) MSG_process_from_PID(int PID); XBT_PUBLIC(int) MSG_process_get_PID(msg_process_t process); XBT_PUBLIC(int) MSG_process_get_PPID(msg_process_t process); XBT_PUBLIC(const char *) MSG_process_get_name(msg_process_t process); -XBT_PUBLIC(int) MSG_process_self_PID(void); -XBT_PUBLIC(int) MSG_process_self_PPID(void); -XBT_PUBLIC(msg_process_t) MSG_process_self(void); -XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar(void); -XBT_PUBLIC(int) MSG_process_get_number(void); +XBT_PUBLIC(int) MSG_process_self_PID(); +XBT_PUBLIC(int) MSG_process_self_PPID(); +XBT_PUBLIC(msg_process_t) MSG_process_self(); +XBT_PUBLIC(xbt_dynar_t) MSG_processes_as_dynar(); +XBT_PUBLIC(int) MSG_process_get_number(); XBT_PUBLIC(msg_error_t) MSG_process_set_kill_time(msg_process_t process, double kill_time); @@ -446,8 +446,8 @@ XBT_PUBLIC(void) MSG_mailbox_set_async(const char *alias); /************************** Action handling **********************************/ XBT_PUBLIC(msg_error_t) MSG_action_trace_run(char *path); -XBT_PUBLIC(void) MSG_action_init(void); -XBT_PUBLIC(void) MSG_action_exit(void); +XBT_PUBLIC(void) MSG_action_init(); +XBT_PUBLIC(void) MSG_action_exit(); /** @brief Opaque type representing a semaphore * @ingroup msg_synchro @@ -521,7 +521,7 @@ XBT_PUBLIC(void) MSG_vm_set_bound(msg_vm_t vm, double bound); XBT_PUBLIC(void) MSG_vm_set_affinity(msg_vm_t vm, msg_host_t pm, unsigned long mask); /* TODO: do we need this? */ -// XBT_PUBLIC(xbt_dynar_t) MSG_vms_as_dynar(void); +// XBT_PUBLIC(xbt_dynar_t) MSG_vms_as_dynar(); /* void* MSG_process_get_property(msg_process_t, char* key) diff --git a/include/simgrid/plugins/energy.h b/include/simgrid/plugins/energy.h index bec96dad15..f21799fe10 100644 --- a/include/simgrid/plugins/energy.h +++ b/include/simgrid/plugins/energy.h @@ -12,7 +12,7 @@ SG_BEGIN_DECL() -XBT_PUBLIC(void) sg_energy_plugin_init(void); +XBT_PUBLIC(void) sg_energy_plugin_init(); XBT_PUBLIC(double) sg_host_get_consumed_energy(sg_host_t host); XBT_PUBLIC(double) sg_host_get_wattmin_at(sg_host_t host, int pstate); XBT_PUBLIC(double) sg_host_get_wattmax_at(sg_host_t host, int pstate); diff --git a/include/simgrid/simdag.h b/include/simgrid/simdag.h index d49faa5c6f..115d9eab8c 100644 --- a/include/simgrid/simdag.h +++ b/include/simgrid/simdag.h @@ -161,8 +161,8 @@ XBT_PUBLIC(void) SD_init(int *argc, char **argv); XBT_PUBLIC(void) SD_config(const char *key, const char *value); XBT_PUBLIC(void) SD_create_environment(const char *platform_file); XBT_PUBLIC(xbt_dynar_t) SD_simulate(double how_long); -XBT_PUBLIC(double) SD_get_clock(void); -XBT_PUBLIC(void) SD_exit(void); +XBT_PUBLIC(double) SD_get_clock(); +XBT_PUBLIC(void) SD_exit(); XBT_PUBLIC(xbt_dynar_t) SD_daxload(const char *filename); XBT_PUBLIC(xbt_dynar_t) SD_dotload(const char *filename); XBT_PUBLIC(xbt_dynar_t) SD_dotload_with_sched(const char *filename); diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 458a8ea8a1..5ebb9850c2 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -128,17 +128,17 @@ SG_BEGIN_DECL() XBT_PUBLIC(xbt_dynar_t) SIMIX_process_get_runnable(); XBT_PUBLIC(smx_process_t) SIMIX_process_from_PID(int PID); -XBT_PUBLIC(xbt_dynar_t) SIMIX_processes_as_dynar(void); +XBT_PUBLIC(xbt_dynar_t) SIMIX_processes_as_dynar(); /* parallelism */ -XBT_PUBLIC(int) SIMIX_context_is_parallel(void); -XBT_PUBLIC(int) SIMIX_context_get_nthreads(void); +XBT_PUBLIC(int) SIMIX_context_is_parallel(); +XBT_PUBLIC(int) SIMIX_context_get_nthreads(); XBT_PUBLIC(void) SIMIX_context_set_nthreads(int nb_threads); XBT_PUBLIC(int) SIMIX_context_get_parallel_threshold(); XBT_PUBLIC(void) SIMIX_context_set_parallel_threshold(int threshold); -XBT_PUBLIC(e_xbt_parmap_mode_t) SIMIX_context_get_parallel_mode(void); +XBT_PUBLIC(e_xbt_parmap_mode_t) SIMIX_context_get_parallel_mode(); XBT_PUBLIC(void) SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode); -XBT_PUBLIC(int) SIMIX_is_maestro(void); +XBT_PUBLIC(int) SIMIX_is_maestro(); /********************************** Global ************************************/ @@ -163,7 +163,7 @@ typedef struct s_smx_timer* smx_timer_t; XBT_PUBLIC(smx_timer_t) SIMIX_timer_set(double date, void (*function)(void*), void *arg); XBT_PUBLIC(void) SIMIX_timer_remove(smx_timer_t timer); -XBT_PUBLIC(double) SIMIX_timer_next(void); +XBT_PUBLIC(double) SIMIX_timer_next(); XBT_PUBLIC(double) SIMIX_timer_get_date(smx_timer_t timer); XBT_PUBLIC(void) SIMIX_display_process_status(); @@ -175,7 +175,7 @@ XBT_PUBLIC(void) SIMIX_create_environment(const char *file); XBT_PUBLIC(void) SIMIX_function_register(const char *name, xbt_main_func_t code); XBT_PUBLIC(void) SIMIX_function_register_default(xbt_main_func_t code); -XBT_PUBLIC(void) SIMIX_init_application(void); +XBT_PUBLIC(void) SIMIX_init_application(); XBT_PUBLIC(void) SIMIX_launch_application(const char *file); XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host, @@ -203,21 +203,21 @@ XBT_PUBLIC(smx_process_t) SIMIX_process_attach( XBT_PUBLIC(void) SIMIX_process_detach(); /*********************************** Host *************************************/ -XBT_PUBLIC(sg_host_t) SIMIX_host_self(void); -XBT_PUBLIC(const char*) SIMIX_host_self_get_name(void); +XBT_PUBLIC(sg_host_t) SIMIX_host_self(); +XBT_PUBLIC(const char*) SIMIX_host_self_get_name(); XBT_PUBLIC(void) SIMIX_host_on(sg_host_t host); XBT_PUBLIC(void) SIMIX_host_off(sg_host_t host, smx_process_t issuer); XBT_PUBLIC(void) SIMIX_host_self_set_data(void *data); -XBT_PUBLIC(void*) SIMIX_host_self_get_data(void); +XBT_PUBLIC(void*) SIMIX_host_self_get_data(); /********************************* Process ************************************/ XBT_PUBLIC(smx_process_t) SIMIX_process_ref(smx_process_t process); XBT_PUBLIC(void) SIMIX_process_unref(smx_process_t process); -XBT_PUBLIC(int) SIMIX_process_count(void); -XBT_PUBLIC(smx_process_t) SIMIX_process_self(void); -XBT_PUBLIC(const char*) SIMIX_process_self_get_name(void); +XBT_PUBLIC(int) SIMIX_process_count(); +XBT_PUBLIC(smx_process_t) SIMIX_process_self(); +XBT_PUBLIC(const char*) SIMIX_process_self_get_name(); XBT_PUBLIC(void) SIMIX_process_self_set_data(void *data); -XBT_PUBLIC(void*) SIMIX_process_self_get_data(void); +XBT_PUBLIC(void*) SIMIX_process_self_get_data(); XBT_PUBLIC(smx_context_t) SIMIX_process_get_context(smx_process_t process); XBT_PUBLIC(void) SIMIX_process_set_context(smx_process_t p,smx_context_t c); XBT_PUBLIC(int) SIMIX_process_has_pending_comms(smx_process_t process); @@ -301,7 +301,7 @@ 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) simcall_process_count(void); +XBT_PUBLIC(int) simcall_process_count(); 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_PUBLIC(void) simcall_process_set_host(smx_process_t process, sg_host_t dest); @@ -366,21 +366,19 @@ XBT_PUBLIC(int) simcall_comm_testany(smx_synchro_t* comms, size_t count); XBT_PUBLIC(void) simcall_set_category(smx_synchro_t synchro, const char *category); /************************** Synchro simcalls **********************************/ -XBT_PUBLIC(smx_mutex_t) simcall_mutex_init(void); +XBT_PUBLIC(smx_mutex_t) simcall_mutex_init(); XBT_PUBLIC(smx_mutex_t) SIMIX_mutex_ref(smx_mutex_t mutex); XBT_PUBLIC(void) SIMIX_mutex_unref(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) simcall_cond_init(void); +XBT_PUBLIC(smx_cond_t) simcall_cond_init(); XBT_PUBLIC(void) SIMIX_cond_unref(smx_cond_t cond); XBT_PUBLIC(smx_cond_t) SIMIX_cond_ref(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) simcall_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double max_duration); XBT_PUBLIC(void) simcall_cond_broadcast(smx_cond_t cond); XBT_PUBLIC(smx_sem_t) simcall_sem_init(int capacity); @@ -388,8 +386,7 @@ XBT_PUBLIC(void) SIMIX_sem_destroy(smx_sem_t sem); XBT_PUBLIC(void) simcall_sem_release(smx_sem_t sem); XBT_PUBLIC(int) simcall_sem_would_block(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(void) simcall_sem_acquire_timeout(smx_sem_t sem, double max_duration); XBT_PUBLIC(int) simcall_sem_get_capacity(smx_sem_t sem); /***************************** File **********************************/ diff --git a/include/smpi/smpi.h b/include/smpi/smpi.h index 0b73451b22..20b5daa709 100644 --- a/include/smpi/smpi.h +++ b/include/smpi/smpi.h @@ -789,21 +789,21 @@ MPI_CALL(XBT_PUBLIC(int), MPI_File_write_ordered_end,(MPI_File fh, const void * //FIXME: End of all the not yet implemented stuff // smpi functions -XBT_PUBLIC(int) smpi_global_size(void); -XBT_PUBLIC(MPI_Comm) smpi_process_comm_self(void); -XBT_PUBLIC(void*) smpi_process_get_user_data(void); +XBT_PUBLIC(int) smpi_global_size(); +XBT_PUBLIC(MPI_Comm) smpi_process_comm_self(); +XBT_PUBLIC(void*) smpi_process_get_user_data(); XBT_PUBLIC(void) smpi_process_set_user_data(void *); XBT_PUBLIC(void) smpi_execute_flops(double flops); XBT_PUBLIC(void) smpi_execute(double duration); XBT_PUBLIC(double) smpi_get_host_power_peak_at(int pstate_index); -XBT_PUBLIC(double) smpi_get_host_current_power_peak(void); -XBT_PUBLIC(int) smpi_get_host_nb_pstates(void); +XBT_PUBLIC(double) smpi_get_host_current_power_peak(); +XBT_PUBLIC(int) smpi_get_host_nb_pstates(); XBT_PUBLIC(void) smpi_set_host_pstate(int pstate_index); -XBT_PUBLIC(int) smpi_get_host_pstate(void); +XBT_PUBLIC(int) smpi_get_host_pstate(); -XBT_PUBLIC(double) smpi_get_host_consumed_energy(void); +XBT_PUBLIC(double) smpi_get_host_consumed_energy(); XBT_PUBLIC(int) smpi_usleep(useconds_t usecs); #if _POSIX_TIMERS > 0 @@ -812,8 +812,8 @@ XBT_PUBLIC(int) smpi_clock_gettime(clockid_t clk_id, struct timespec *tp); #endif XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs); XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, void* tz); -XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void); -XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp (void); +XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (); +XBT_PUBLIC(unsigned long long) smpi_rastro_timestamp (); XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line, int iters, double threshold); XBT_PUBLIC(int) smpi_sample_2(int global, const char *file, int line); XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line); @@ -856,22 +856,22 @@ XBT_PUBLIC(void*) smpi_shared_set_call(const char* func, const char* input, void /* Fortran specific stuff */ XBT_PUBLIC(int) __attribute__((weak)) smpi_simulated_main_(int argc, char** argv); -XBT_PUBLIC(int) __attribute__((weak)) MAIN__(void); +XBT_PUBLIC(int) __attribute__((weak)) MAIN__(); XBT_PUBLIC(int) smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]); -XBT_PUBLIC(void) __attribute__((weak)) user_main_(void); -XBT_PUBLIC(int) smpi_process_index(void); +XBT_PUBLIC(void) __attribute__((weak)) user_main_(); +XBT_PUBLIC(int) smpi_process_index(); XBT_PUBLIC(void) smpi_process_init(int *argc, char ***argv); /* Trace replay specific stuff */ XBT_PUBLIC(void) smpi_replay_run(int *argc, char***argv); XBT_PUBLIC(void) SMPI_app_instance_register(const char *name, xbt_main_func_t code, int num_processes); -XBT_PUBLIC(void) SMPI_init(void); -XBT_PUBLIC(void) SMPI_finalize(void); +XBT_PUBLIC(void) SMPI_init(); +XBT_PUBLIC(void) SMPI_finalize(); /* Manual global privatization fallback */ XBT_PUBLIC(void) smpi_register_static(void* arg, void_f_pvoid_t free_fn); -XBT_PUBLIC(void) smpi_free_static(void); +XBT_PUBLIC(void) smpi_free_static(); #define SMPI_VARINIT_GLOBAL(name,type) \ type *name = NULL; \ diff --git a/include/xbt/automaton.h b/include/xbt/automaton.h index 6b8be48537..424cf49cb9 100644 --- a/include/xbt/automaton.h +++ b/include/xbt/automaton.h @@ -61,7 +61,7 @@ typedef struct xbt_automaton_propositional_symbol* xbt_automaton_propositional_s typedef int (*xbt_automaton_propositional_symbol_callback_type)(void*); typedef void (*xbt_automaton_propositional_symbol_free_function_type)(void*); -XBT_PUBLIC(xbt_automaton_t) xbt_automaton_new(void); +XBT_PUBLIC(xbt_automaton_t) xbt_automaton_new(); XBT_PUBLIC(void) xbt_automaton_load(xbt_automaton_t automaton, const char *file); XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_state_new(xbt_automaton_t a, int type, char* id); XBT_PUBLIC(xbt_automaton_transition_t) diff --git a/include/xbt/backtrace.h b/include/xbt/backtrace.h index a8a8ffeff3..508cbc5a0b 100644 --- a/include/xbt/backtrace.h +++ b/include/xbt/backtrace.h @@ -12,7 +12,7 @@ SG_BEGIN_DECL() typedef void* xbt_backtrace_location_t; /** @brief Shows a backtrace of the current location */ -XBT_PUBLIC(void) xbt_backtrace_display_current(void); +XBT_PUBLIC(void) xbt_backtrace_display_current(); /** @brief reimplementation of glibc backtrace based directly on gcc library, without implicit malloc */ XBT_PUBLIC(int) xbt_backtrace_no_malloc(void**bt, int size); diff --git a/include/xbt/config.h b/include/xbt/config.h index 3e87a94cfe..aa14952d10 100644 --- a/include/xbt/config.h +++ b/include/xbt/config.h @@ -101,7 +101,7 @@ XBT_PUBLIC(int) xbt_cfg_is_default_value(const char *name); /** \brief Callback types. They get the name of the modified entry, and the position of the changed value */ typedef void (*xbt_cfg_cb_t) (const char * name); -XBT_PUBLIC(xbt_cfg_t) xbt_cfg_new(void); +XBT_PUBLIC(xbt_cfg_t) xbt_cfg_new(); XBT_PUBLIC(void) xbt_cfg_free(xbt_cfg_t * cfg); XBT_PUBLIC(void) xbt_cfg_dump(const char *name, const char *indent, xbt_cfg_t cfg); @@ -120,8 +120,8 @@ XBT_PUBLIC(void) xbt_cfg_register_string (const char *name, const char*default_v XBT_PUBLIC(void) xbt_cfg_register_boolean(const char *name, const char*default_val,xbt_cfg_cb_t cb_set, const char *desc); XBT_PUBLIC(void) xbt_cfg_register_alias(const char *newname, const char *oldname); -XBT_PUBLIC(void) xbt_cfg_aliases(void); -XBT_PUBLIC(void) xbt_cfg_help(void); +XBT_PUBLIC(void) xbt_cfg_aliases(); +XBT_PUBLIC(void) xbt_cfg_help(); /* @} */ /** @defgroup XBT_cfg_get Getting the stored values diff --git a/include/xbt/cunit.h b/include/xbt/cunit.h index d4d1cbab4d..6bfa6a0d40 100644 --- a/include/xbt/cunit.h +++ b/include/xbt/cunit.h @@ -25,7 +25,7 @@ typedef struct s_xbt_test_suite *xbt_test_suite_t; typedef struct s_xbt_test_unit *xbt_test_unit_t; /* test callback function type */ -typedef void (*ts_test_cb_t) (void); +typedef void (*ts_test_cb_t) (); /* test suite operations */ XBT_PUBLIC(xbt_test_suite_t) xbt_test_suite_new(const char *name, const char *fmt, ...); @@ -53,7 +53,7 @@ XBT_PUBLIC(int) xbt_test_run(char *selection, int verbosity); /* Show information about the selection of tests */ XBT_PUBLIC(void) xbt_test_dump(char *selection); /* Cleanup the mess */ -XBT_PUBLIC(void) xbt_test_exit(void); +XBT_PUBLIC(void) xbt_test_exit(); /** * @addtogroup XBT_cunit @@ -130,9 +130,9 @@ XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt, ...) XBT_PUBLIC(void) xbt_test_exception(xbt_ex_t e); /** @brief Declare that the lastly started test was expected to fail (and actually failed) */ -XBT_PUBLIC(void) xbt_test_expect_failure(void); +XBT_PUBLIC(void) xbt_test_expect_failure(); /** @brief Declare that the lastly started test should be skipped today */ -XBT_PUBLIC(void) xbt_test_skip(void); +XBT_PUBLIC(void) xbt_test_skip(); /** @} */ diff --git a/include/xbt/dict.h b/include/xbt/dict.h index 59eb624420..4f6e0615aa 100644 --- a/include/xbt/dict.h +++ b/include/xbt/dict.h @@ -56,7 +56,7 @@ typedef struct s_xbt_dictelm { xbt_dictelm_t next; } s_xbt_dictelm_t; -XBT_PUBLIC(xbt_dict_t) xbt_dict_new(void); +XBT_PUBLIC(xbt_dict_t) xbt_dict_new(); XBT_PUBLIC(xbt_dict_t) xbt_dict_new_homogeneous(void_f_pvoid_t free_ctn); XBT_PUBLIC(void) xbt_dict_free(xbt_dict_t * dict); XBT_PUBLIC(unsigned int) xbt_dict_size(xbt_dict_t dict); diff --git a/include/xbt/fifo.h b/include/xbt/fifo.h index 66ccf3d1ec..ab8a16076a 100644 --- a/include/xbt/fifo.h +++ b/include/xbt/fifo.h @@ -34,7 +34,7 @@ typedef struct xbt_fifo_item *xbt_fifo_item_t; */ typedef struct xbt_fifo *xbt_fifo_t; -XBT_PUBLIC(xbt_fifo_t) xbt_fifo_new(void); +XBT_PUBLIC(xbt_fifo_t) xbt_fifo_new(); XBT_PUBLIC(void) xbt_fifo_free(xbt_fifo_t l); XBT_PUBLIC(void) xbt_fifo_reset(xbt_fifo_t l); /** @} */ @@ -59,7 +59,7 @@ XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_search_item(xbt_fifo_t f, int_f_pvoid_pvoid * @{ */ -XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(void); +XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_new_item(); XBT_PUBLIC(void) xbt_fifo_set_item_content(xbt_fifo_item_t i, void *v); XBT_PUBLIC(void *) xbt_fifo_get_item_content(xbt_fifo_item_t i); XBT_PUBLIC(void) xbt_fifo_free_item(xbt_fifo_item_t i); @@ -106,7 +106,7 @@ XBT_PUBLIC(xbt_fifo_t) xbt_fifo_copy(xbt_fifo_t l); /** @} */ /* Deprecated functions: don't use! */ -XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_newitem(void); +XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_newitem(); XBT_PUBLIC(void) xbt_fifo_freeitem(xbt_fifo_item_t l); XBT_PUBLIC(xbt_fifo_item_t) xbt_fifo_getFirstItem(xbt_fifo_t l); diff --git a/include/xbt/lib.h b/include/xbt/lib.h index 15553e30a0..cb7cea8049 100644 --- a/include/xbt/lib.h +++ b/include/xbt/lib.h @@ -58,7 +58,7 @@ typedef struct s_xbt_lib* xbt_lib_t; #define xbt_lib_cursor_t xbt_dict_cursor_t -XBT_PUBLIC(xbt_lib_t) xbt_lib_new(void); +XBT_PUBLIC(xbt_lib_t) xbt_lib_new(); XBT_PUBLIC(void) xbt_lib_free(xbt_lib_t * lib); XBT_PUBLIC(int) xbt_lib_add_level(xbt_lib_t lib, void_f_pvoid_t free_f); XBT_PUBLIC(void) xbt_lib_set(xbt_lib_t lib, const char *name, int level, void *obj); diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 1d17aa2f07..46b0c532d3 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -23,7 +23,7 @@ XBT_PUBLIC_DATA(int) xbt_pagesize; /** Cache the number of bits of addresses inside a given page, log2(xbt_pagesize). */ XBT_PUBLIC_DATA(int) xbt_pagebits; -XBT_PUBLIC(const char *) xbt_procname(void); +XBT_PUBLIC(const char *) xbt_procname(); /** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib) , while SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */ diff --git a/include/xbt/replay.h b/include/xbt/replay.h index 41bdf07104..8267a42d5f 100644 --- a/include/xbt/replay.h +++ b/include/xbt/replay.h @@ -28,9 +28,9 @@ XBT_PUBLIC(void) xbt_replay_reader_free(xbt_replay_reader_t *reader); XBT_PUBLIC(void) xbt_replay_action_register(const char *action_name, action_fun function); XBT_PUBLIC(int) xbt_replay_action_runner(int argc, char *argv[]); -XBT_PUBLIC(int) _xbt_replay_is_active(void); -XBT_PUBLIC(int) _xbt_replay_action_init(void); -XBT_PUBLIC(void) _xbt_replay_action_exit(void); +XBT_PUBLIC(int) _xbt_replay_is_active(); +XBT_PUBLIC(int) _xbt_replay_action_init(); +XBT_PUBLIC(void) _xbt_replay_action_exit(); SG_END_DECL() diff --git a/include/xbt/strbuff.h b/include/xbt/strbuff.h index 585d719d09..a07d1fb8aa 100644 --- a/include/xbt/strbuff.h +++ b/include/xbt/strbuff.h @@ -37,7 +37,7 @@ typedef struct xbt_strbuff s_xbt_strbuff_t; typedef struct xbt_strbuff* xbt_strbuff_t; XBT_PUBLIC(void) xbt_strbuff_clear(xbt_strbuff_t b); -XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new(void); +XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new(); XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new_from(const char *s); XBT_PUBLIC(void) xbt_strbuff_free(xbt_strbuff_t b); XBT_PUBLIC(void) xbt_strbuff_free_container(xbt_strbuff_t b); diff --git a/include/xbt/synchro_core.h b/include/xbt/synchro_core.h index c3378add56..4a47ad5efe 100644 --- a/include/xbt/synchro_core.h +++ b/include/xbt/synchro_core.h @@ -35,7 +35,7 @@ SG_BEGIN_DECL() typedef struct s_smx_mutex_ *xbt_mutex_t; /** @brief Creates a new mutex variable */ -XBT_PUBLIC(xbt_mutex_t) xbt_mutex_init(void); +XBT_PUBLIC(xbt_mutex_t) xbt_mutex_init(); /** @brief Blocks onto the given mutex variable */ XBT_PUBLIC(void) xbt_mutex_acquire(xbt_mutex_t mutex); @@ -61,7 +61,7 @@ XBT_PUBLIC(void) xbt_mutex_destroy(xbt_mutex_t mutex); typedef struct s_smx_cond_ *xbt_cond_t; /** @brief Creates a condition variable */ -XBT_PUBLIC(xbt_cond_t) xbt_cond_init(void); +XBT_PUBLIC(xbt_cond_t) xbt_cond_init(); /** @brief Blocks onto the given condition variable */ XBT_PUBLIC(void) xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex); diff --git a/include/xbt/sysdep.h b/include/xbt/sysdep.h index 6ae59ffaab..219cf714b6 100644 --- a/include/xbt/sysdep.h +++ b/include/xbt/sysdep.h @@ -31,7 +31,7 @@ SG_BEGIN_DECL() * @{ */ /** @brief Kill the program in silence */ -XBT_PUBLIC(void) XBT_ATTRIB_NORETURN xbt_abort(void); +XBT_PUBLIC(void) XBT_ATTRIB_NORETURN xbt_abort(); /** * @brief Kill the program with an error message @@ -71,7 +71,7 @@ static XBT_ALWAYS_INLINE char *xbt_strdup(const char *s) { return res; } -XBT_PUBLIC(void) xbt_backtrace_display_current(void); +XBT_PUBLIC(void) xbt_backtrace_display_current(); /** @brief Like malloc, but xbt_die() on error @hideinitializer */ diff --git a/include/xbt/xbt_os_thread.h b/include/xbt/xbt_os_thread.h index 33bb3e6c33..da2ddd86fa 100644 --- a/include/xbt/xbt_os_thread.h +++ b/include/xbt/xbt_os_thread.h @@ -25,7 +25,7 @@ typedef pthread_key_t xbt_os_thread_key_t; * @{ */ -XBT_PUBLIC(int) xbt_os_get_numcores(void); +XBT_PUBLIC(int) xbt_os_get_numcores(); /** \brief Thread data type (opaque structure) */ typedef struct xbt_os_thread_ *xbt_os_thread_t; @@ -33,16 +33,16 @@ XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_create(const char *name, pvoid_f_pvoid XBT_PUBLIC(void) xbt_os_thread_exit(int *retcode); XBT_PUBLIC(void) xbt_os_thread_detach(xbt_os_thread_t thread); -XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_self(void); -XBT_PUBLIC(const char *) xbt_os_thread_self_name(void); +XBT_PUBLIC(xbt_os_thread_t) xbt_os_thread_self(); +XBT_PUBLIC(const char *) xbt_os_thread_self_name(); XBT_PUBLIC(void) xbt_os_thread_set_extra_data(void *data); -XBT_PUBLIC(void *) xbt_os_thread_get_extra_data(void); +XBT_PUBLIC(void *) xbt_os_thread_get_extra_data(); XBT_PUBLIC(void) xbt_os_thread_key_create(xbt_os_thread_key_t* key); XBT_PUBLIC(void) xbt_os_thread_set_specific(xbt_os_thread_key_t key, void* value); XBT_PUBLIC(void*) xbt_os_thread_get_specific(xbt_os_thread_key_t key); /* xbt_os_thread_join frees the joined thread (ie the XBT wrapper around it, the OS frees the rest) */ XBT_PUBLIC(void) xbt_os_thread_join(xbt_os_thread_t thread, void **thread_return); -XBT_PUBLIC(void) xbt_os_thread_yield(void); +XBT_PUBLIC(void) xbt_os_thread_yield(); XBT_PUBLIC(void) xbt_os_thread_cancel(xbt_os_thread_t thread); XBT_PUBLIC(void) xbt_os_thread_setstacksize(int stack_size); XBT_PUBLIC(void) xbt_os_thread_setguardsize(int guard_size); @@ -51,14 +51,14 @@ XBT_PUBLIC(int) xbt_os_thread_atfork(void (*prepare)(void), void (*parent)(void) /** \brief Thread mutex data type (opaque structure) */ typedef struct xbt_os_mutex_ *xbt_os_mutex_t; -XBT_PUBLIC(xbt_os_mutex_t) xbt_os_mutex_init(void); +XBT_PUBLIC(xbt_os_mutex_t) xbt_os_mutex_init(); XBT_PUBLIC(void) xbt_os_mutex_acquire(xbt_os_mutex_t mutex); XBT_PUBLIC(void) xbt_os_mutex_release(xbt_os_mutex_t mutex); XBT_PUBLIC(void) xbt_os_mutex_destroy(xbt_os_mutex_t mutex); /** \brief Thread condition data type (opaque structure) */ typedef struct xbt_os_cond_ *xbt_os_cond_t; -XBT_PUBLIC(xbt_os_cond_t) xbt_os_cond_init(void); +XBT_PUBLIC(xbt_os_cond_t) xbt_os_cond_init(); XBT_PUBLIC(void) xbt_os_cond_wait(xbt_os_cond_t cond, xbt_os_mutex_t mutex); XBT_PUBLIC(void) xbt_os_cond_signal(xbt_os_cond_t cond); XBT_PUBLIC(void) xbt_os_cond_broadcast(xbt_os_cond_t cond); diff --git a/include/xbt/xbt_os_time.h b/include/xbt/xbt_os_time.h index b9d9b46b92..a93f2ebde4 100644 --- a/include/xbt/xbt_os_time.h +++ b/include/xbt/xbt_os_time.h @@ -18,15 +18,15 @@ SG_BEGIN_DECL() * * gives the number of seconds since the Epoch (00:00:00 UTC, January 1, 1970). */ -XBT_PUBLIC(double) xbt_os_time(void); +XBT_PUBLIC(double) xbt_os_time(); XBT_PUBLIC(void) xbt_os_sleep(double sec); typedef struct s_xbt_os_timer *xbt_os_timer_t; -XBT_PUBLIC(xbt_os_timer_t) xbt_os_timer_new(void); +XBT_PUBLIC(xbt_os_timer_t) xbt_os_timer_new(); XBT_PUBLIC(void) xbt_os_timer_free(xbt_os_timer_t timer); XBT_PUBLIC(double) xbt_os_timer_elapsed(xbt_os_timer_t timer); -XBT_PUBLIC(size_t) xbt_os_timer_size(void); +XBT_PUBLIC(size_t) xbt_os_timer_size(); XBT_PUBLIC(void) xbt_os_walltimer_start(xbt_os_timer_t timer); XBT_PUBLIC(void) xbt_os_walltimer_resume(xbt_os_timer_t timer); diff --git a/src/bindings/java/jmsg.h b/src/bindings/java/jmsg.h index 8b9cea8df4..deba4ac89f 100644 --- a/src/bindings/java/jmsg.h +++ b/src/bindings/java/jmsg.h @@ -16,8 +16,8 @@ SG_BEGIN_DECL() extern int JAVA_HOST_LEVEL; extern int JAVA_STORAGE_LEVEL; -JavaVM *get_java_VM(void); -JNIEnv *get_current_thread_env(void); +JavaVM *get_java_VM(); +JNIEnv *get_current_thread_env(); /** * This function throws the correct exception according to the status provided. */ @@ -38,7 +38,7 @@ JNIEXPORT void JNICALL JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs); -JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit(void); +JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_energyInit(); JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_debug(JNIEnv *, jclass, jstring); diff --git a/src/include/instr/instr_interface.h b/src/include/instr/instr_interface.h index 0901fbd306..746a555f37 100644 --- a/src/include/instr/instr_interface.h +++ b/src/include/instr/instr_interface.h @@ -8,12 +8,12 @@ SG_BEGIN_DECL() -XBT_PUBLIC(int) TRACE_start (void); -XBT_PUBLIC(int) TRACE_end (void); +XBT_PUBLIC(int) TRACE_start (); +XBT_PUBLIC(int) TRACE_end (); XBT_PUBLIC(void) TRACE_global_init(int *argc, char **argv); XBT_PUBLIC(void) TRACE_help(int detailed); -XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc(void); -XBT_PUBLIC(void) TRACE_surf_resource_utilization_release(void); +XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc(); +XBT_PUBLIC(void) TRACE_surf_resource_utilization_release(); XBT_PUBLIC(void) TRACE_add_start_function(void (*func)(void)); XBT_PUBLIC(void) TRACE_add_end_function(void (*func)(void)); diff --git a/src/include/mc/mc.h b/src/include/mc/mc.h index 9d3deb3836..6e09a7420a 100644 --- a/src/include/mc/mc.h +++ b/src/include/mc/mc.h @@ -62,7 +62,7 @@ XBT_PRIVATE void _mc_cfg_cb_comms_determinism(const char *name); XBT_PRIVATE void _mc_cfg_cb_send_determinism(const char *name); XBT_PRIVATE void _mc_cfg_cb_termination(const char *name); -XBT_PUBLIC(void) MC_run(void); +XBT_PUBLIC(void) MC_run(); XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double); XBT_PUBLIC(double) MC_process_clock_get(smx_process_t); XBT_PRIVATE void MC_automaton_load(const char *file); @@ -77,9 +77,9 @@ XBT_PUBLIC(void) MC_register_stack_area(void *stack, smx_process_t process, ucon #endif /********************************* Memory *************************************/ -XBT_PUBLIC(void) MC_memory_init(void); /* Initialize the memory subsystem */ -XBT_PUBLIC(void) MC_memory_exit(void); -XBT_PUBLIC(void) MC_memory_init_server(void); +XBT_PUBLIC(void) MC_memory_init(); /* Initialize the memory subsystem */ +XBT_PUBLIC(void) MC_memory_exit(); +XBT_PUBLIC(void) MC_memory_init_server(); SG_END_DECL() diff --git a/src/include/simgrid/sg_config.h b/src/include/simgrid/sg_config.h index 96a46eca49..4bd78c5fdb 100644 --- a/src/include/simgrid/sg_config.h +++ b/src/include/simgrid/sg_config.h @@ -14,6 +14,6 @@ XBT_PUBLIC_DATA(int) _sg_cfg_init_status; XBT_PUBLIC_DATA(int) _sg_cfg_exit_asap; XBT_PUBLIC(void) sg_config_init(int *argc, char **argv); -XBT_PUBLIC(void) sg_config_finalize(void); +XBT_PUBLIC(void) sg_config_finalize(); SG_END_DECL() diff --git a/src/include/smpi/smpi_interface.h b/src/include/smpi/smpi_interface.h index 6f6c9d0392..916165e86e 100644 --- a/src/include/smpi/smpi_interface.h +++ b/src/include/smpi/smpi_interface.h @@ -94,8 +94,8 @@ XBT_PUBLIC_DATA(int (*mpi_coll_barrier_fun)(MPI_Comm comm)); XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table); XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, char *name, const char *desc); -XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)(void); -XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(void); +XBT_PUBLIC_DATA(void) (*smpi_coll_cleanup_callback)(); +XBT_PUBLIC(void) smpi_coll_cleanup_mvapich2(); SG_END_DECL() diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index 9eebbb49ee..3616544458 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -480,14 +480,14 @@ XBT_PUBLIC_DATA(surf_cpu_model_t) surf_cpu_model_vm; * * You shouldn't have to call it by yourself. */ -XBT_PUBLIC(void) surf_cpu_model_init_Cas01(void); +XBT_PUBLIC(void) surf_cpu_model_init_Cas01(); /** \ingroup SURF_models * \brief Initializes the CPU model with trace integration [Deprecated] * * You shouldn't have to call it by yourself. */ -XBT_PUBLIC(void) surf_cpu_model_init_ti(void); +XBT_PUBLIC(void) surf_cpu_model_init_ti(); /** \ingroup SURF_models * \brief The list of all available optimization modes (both for cpu and networks). @@ -522,7 +522,7 @@ XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model; * * \see surf_host_model_init_SMPI() */ -XBT_PUBLIC(void) surf_network_model_init_SMPI(void); +XBT_PUBLIC(void) surf_network_model_init_SMPI(); /** \ingroup SURF_models * \brief Same as network model 'LagrangeVelho', only with different correction factors. @@ -532,7 +532,7 @@ XBT_PUBLIC(void) surf_network_model_init_SMPI(void); * * \see surf_host_model_init_IB() */ -XBT_PUBLIC(void) surf_network_model_init_IB(void); +XBT_PUBLIC(void) surf_network_model_init_IB(); /** \ingroup SURF_models * \brief Initializes the platform with the network model 'LegrandVelho' @@ -542,7 +542,7 @@ XBT_PUBLIC(void) surf_network_model_init_IB(void); * * \see surf_host_model_init_LegrandVelho() */ -XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void); +XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(); /** \ingroup SURF_models * \brief Initializes the platform with the network model 'Constant' @@ -553,7 +553,7 @@ XBT_PUBLIC(void) surf_network_model_init_LegrandVelho(void); * * \see surf_host_model_init_compound() */ -XBT_PUBLIC(void) surf_network_model_init_Constant(void); +XBT_PUBLIC(void) surf_network_model_init_Constant(); /** \ingroup SURF_models * \brief Initializes the platform with the network model CM02 @@ -561,7 +561,7 @@ XBT_PUBLIC(void) surf_network_model_init_Constant(void); * You sould call this function by yourself only if you plan using surf_host_model_init_compound. * See comments in the code for more information. */ -XBT_PUBLIC(void) surf_network_model_init_CM02(void); +XBT_PUBLIC(void) surf_network_model_init_CM02(); #if HAVE_NS3 /** \ingroup SURF_models @@ -572,7 +572,7 @@ XBT_PUBLIC(void) surf_network_model_init_CM02(void); * * \see surf_host_model_init_NS3() */ -XBT_PUBLIC(void) surf_network_model_init_NS3(void); +XBT_PUBLIC(void) surf_network_model_init_NS3(); #endif /** \ingroup SURF_models @@ -586,7 +586,7 @@ XBT_PUBLIC(void) surf_network_model_init_NS3(void); * * Call this function only if you plan using surf_host_model_init_compound. */ -XBT_PUBLIC(void) surf_network_model_init_Reno(void); +XBT_PUBLIC(void) surf_network_model_init_Reno(); /** \ingroup SURF_models * \brief Initializes the platform with the network model Reno2 @@ -599,7 +599,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno(void); * * Call this function only if you plan using surf_host_model_init_compound. */ -XBT_PUBLIC(void) surf_network_model_init_Reno2(void); +XBT_PUBLIC(void) surf_network_model_init_Reno2(); /** \ingroup SURF_models * \brief Initializes the platform with the network model Vegas @@ -612,7 +612,7 @@ XBT_PUBLIC(void) surf_network_model_init_Reno2(void); * * Call this function only if you plan using surf_host_model_init_compound. */ -XBT_PUBLIC(void) surf_network_model_init_Vegas(void); +XBT_PUBLIC(void) surf_network_model_init_Vegas(); /** \ingroup SURF_models * \brief The list of all available network model models @@ -622,7 +622,7 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_network_model_description[]; /** \ingroup SURF_models * \brief The storage model */ -XBT_PUBLIC(void) surf_storage_model_init_default(void); +XBT_PUBLIC(void) surf_storage_model_init_default(); /** \ingroup SURF_models * \brief The list of all available storage modes. @@ -653,7 +653,7 @@ XBT_PUBLIC_DATA(surf_vm_model_t) surf_vm_model; * * This function should be called after a cpu_model and a network_model have been set up. */ -XBT_PUBLIC(void) surf_host_model_init_compound(void); +XBT_PUBLIC(void) surf_host_model_init_compound(); /** \ingroup SURF_models * \brief Initializes the platform with the current best network and cpu models at hand @@ -663,7 +663,7 @@ XBT_PUBLIC(void) surf_host_model_init_compound(void); * traffic support) and the CPU model with the model Cas01. * Such model is subject to modification with warning in the ChangeLog so monitor it! */ -XBT_PUBLIC(void) surf_host_model_init_current_default(void); +XBT_PUBLIC(void) surf_host_model_init_current_default(); /** \ingroup SURF_models * \brief Initializes the platform with the model L07 @@ -671,7 +671,7 @@ XBT_PUBLIC(void) surf_host_model_init_current_default(void); * With this model, only parallel tasks can be used. Resource sharing is done by identifying bottlenecks and giving an * equal share of the model to each action. */ -XBT_PUBLIC(void) surf_host_model_init_ptask_L07(void); +XBT_PUBLIC(void) surf_host_model_init_ptask_L07(); /** \ingroup SURF_models * \brief The list of all available host model models @@ -686,7 +686,7 @@ XBT_PUBLIC_DATA(s_surf_model_description_t) surf_host_model_description[]; * traffic support) and the CPU model with the model Cas01. * Such model is subject to modification with warning in the ChangeLog so monitor it! */ -XBT_PUBLIC(void) surf_vm_model_init_HL13(void); +XBT_PUBLIC(void) surf_vm_model_init_HL13(); /** \ingroup SURF_models * \brief The list of all available vm model models @@ -727,7 +727,7 @@ XBT_PUBLIC(void) surf_init(int *argc, char **argv); /* initialize common str * * This function must be called before the first call to surf_solve() */ -XBT_PUBLIC(void) surf_presolve(void); +XBT_PUBLIC(void) surf_presolve(); /** \ingroup SURF_simulation * \brief Performs a part of the simulation @@ -746,7 +746,7 @@ XBT_PUBLIC(double) surf_solve(double max_date); * * Return the current time in millisecond. */ -XBT_PUBLIC(double) surf_get_clock(void); +XBT_PUBLIC(double) surf_get_clock(); /** \ingroup SURF_simulation * \brief Exit SURF @@ -755,7 +755,7 @@ XBT_PUBLIC(double) surf_get_clock(void); * * \see surf_init() */ -XBT_PUBLIC(void) surf_exit(void); +XBT_PUBLIC(void) surf_exit(); /* Prototypes of the functions that handle the properties */ XBT_PUBLIC_DATA(xbt_dict_t) current_property_set;// the prop set for the currently parsed element (also used in SIMIX) @@ -774,22 +774,22 @@ XBT_PUBLIC(xbt_dict_t) get_as_router_properties(const char* name); * Returns the initial path. On Windows the initial path is the current directory for the current process in the other * case the function returns "./" that represents the current directory on Unix/Linux platforms. */ -const char *__surf_get_initial_path(void); +const char *__surf_get_initial_path(); /********** Tracing **********/ /* from surf_instr.c */ void TRACE_surf_action(surf_action_t surf_action, const char *category); -void TRACE_surf_alloc(void); -void TRACE_surf_release(void); +void TRACE_surf_alloc(); +void TRACE_surf_release(); /* instr_routing.c */ -void instr_routing_define_callbacks (void); +void instr_routing_define_callbacks (); void instr_new_variable_type (const char *new_typename, const char *color); void instr_new_user_variable_type (const char *father_type, const char *new_typename, const char *color); void instr_new_user_state_type (const char *father_type, const char *new_typename); void instr_new_value_for_user_state_type (const char *_typename, const char *value, const char *color); -int instr_platform_traced (void); -xbt_graph_t instr_routing_platform_graph (void); +int instr_platform_traced (); +xbt_graph_t instr_routing_platform_graph (); void instr_routing_platform_graph_export_graphviz (xbt_graph_t g, const char *filename); SG_END_DECL() diff --git a/src/instr/instr_interface.cpp b/src/instr/instr_interface.cpp index b8b28ef313..5571851ad1 100644 --- a/src/instr/instr_interface.cpp +++ b/src/instr/instr_interface.cpp @@ -279,7 +279,7 @@ void TRACE_mark(const char *mark_type, const char *mark_value) * * \return A dynar with the declared marks, must be freed with xbt_dynar_free. */ -xbt_dynar_t TRACE_get_marks (void) +xbt_dynar_t TRACE_get_marks () { if (!TRACE_is_enabled()) return nullptr; @@ -522,7 +522,7 @@ void TRACE_vm_variable_sub_with_time (double time, const char *vm, const char *v * * \return A dynar with the declared host variables, must be freed with xbt_dynar_free. */ -xbt_dynar_t TRACE_get_vm_variables (void) +xbt_dynar_t TRACE_get_vm_variables () { return instr_dict_to_dynar (user_vm_variables); } @@ -669,7 +669,7 @@ void TRACE_host_variable_sub_with_time (double time, const char *host, const cha * * \return A dynar with the declared host variables, must be freed with xbt_dynar_free. */ -xbt_dynar_t TRACE_get_host_variables (void) +xbt_dynar_t TRACE_get_host_variables () { return instr_dict_to_dynar (user_host_variables); } @@ -940,7 +940,7 @@ void TRACE_link_srcdst_variable_sub_with_time (double time, const char *src, con * * \return A dynar with the declared link variables, must be freed with xbt_dynar_free. */ -xbt_dynar_t TRACE_get_link_variables (void) +xbt_dynar_t TRACE_get_link_variables () { return instr_dict_to_dynar (user_link_variables); } diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index cba656d5dc..eb40012ad2 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -78,7 +78,7 @@ static void recursiveDestroyType (type_t type) PJ_type_free(type); } -void PJ_type_free_all (void) +void PJ_type_free_all () { recursiveDestroyType (PJ_type_get_root()); rootType = nullptr; diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 127043230c..fb51e5b66b 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -240,11 +240,11 @@ extern XBT_PRIVATE double TRACE_last_timestamp_to_dump; XBT_PRIVATE void TRACE_header(int basic, int size); /* from paje.c */ -XBT_PRIVATE void TRACE_init(void); -XBT_PRIVATE void TRACE_finalize(void); -XBT_PRIVATE void TRACE_paje_init(void); -XBT_PRIVATE void TRACE_paje_start(void); -XBT_PRIVATE void TRACE_paje_end(void); +XBT_PRIVATE void TRACE_init(); +XBT_PRIVATE void TRACE_finalize(); +XBT_PRIVATE void TRACE_paje_init(); +XBT_PRIVATE void TRACE_paje_start(); +XBT_PRIVATE void TRACE_paje_end(); XBT_PRIVATE void TRACE_paje_dump_buffer (int force); XBT_PUBLIC(void) new_pajeDefineContainerType(type_t type); XBT_PUBLIC(void) new_pajeDefineVariableType(type_t type); @@ -272,66 +272,66 @@ XBT_PUBLIC(void) new_pajeEndLink (double timestamp, container_t container, type_ XBT_PUBLIC(void) new_pajeNewEvent (double timestamp, container_t container, type_t type, val_t value); /* from instr_config.c */ -XBT_PRIVATE bool TRACE_needs_platform (void); -XBT_PRIVATE bool TRACE_is_enabled(void); -XBT_PRIVATE bool TRACE_platform(void); -XBT_PRIVATE bool TRACE_platform_topology(void); -XBT_PRIVATE bool TRACE_is_configured(void); -XBT_PRIVATE bool TRACE_categorized (void); -XBT_PRIVATE bool TRACE_uncategorized (void); -XBT_PRIVATE bool TRACE_msg_process_is_enabled(void); -XBT_PRIVATE bool TRACE_msg_vm_is_enabled(void); -XBT_PRIVATE bool TRACE_buffer (void); -XBT_PRIVATE bool TRACE_disable_link(void); -XBT_PRIVATE bool TRACE_disable_speed(void); -XBT_PRIVATE bool TRACE_onelink_only (void); -XBT_PRIVATE bool TRACE_disable_destroy (void); -XBT_PRIVATE bool TRACE_basic (void); -XBT_PRIVATE bool TRACE_display_sizes (void); -XBT_PRIVATE char *TRACE_get_comment (void); -XBT_PRIVATE char *TRACE_get_comment_file (void); -XBT_PRIVATE int TRACE_precision (void); -XBT_PRIVATE char *TRACE_get_filename(void); -XBT_PRIVATE char *TRACE_get_viva_uncat_conf (void); -XBT_PRIVATE char *TRACE_get_viva_cat_conf (void); -XBT_PRIVATE void TRACE_generate_viva_uncat_conf (void); -XBT_PRIVATE void TRACE_generate_viva_cat_conf (void); -XBT_PRIVATE void instr_pause_tracing (void); -XBT_PRIVATE void instr_resume_tracing (void); +XBT_PRIVATE bool TRACE_needs_platform (); +XBT_PRIVATE bool TRACE_is_enabled(); +XBT_PRIVATE bool TRACE_platform(); +XBT_PRIVATE bool TRACE_platform_topology(); +XBT_PRIVATE bool TRACE_is_configured(); +XBT_PRIVATE bool TRACE_categorized (); +XBT_PRIVATE bool TRACE_uncategorized (); +XBT_PRIVATE bool TRACE_msg_process_is_enabled(); +XBT_PRIVATE bool TRACE_msg_vm_is_enabled(); +XBT_PRIVATE bool TRACE_buffer (); +XBT_PRIVATE bool TRACE_disable_link(); +XBT_PRIVATE bool TRACE_disable_speed(); +XBT_PRIVATE bool TRACE_onelink_only (); +XBT_PRIVATE bool TRACE_disable_destroy (); +XBT_PRIVATE bool TRACE_basic (); +XBT_PRIVATE bool TRACE_display_sizes (); +XBT_PRIVATE char *TRACE_get_comment (); +XBT_PRIVATE char *TRACE_get_comment_file (); +XBT_PRIVATE int TRACE_precision (); +XBT_PRIVATE char *TRACE_get_filename(); +XBT_PRIVATE char *TRACE_get_viva_uncat_conf (); +XBT_PRIVATE char *TRACE_get_viva_cat_conf (); +XBT_PRIVATE void TRACE_generate_viva_uncat_conf (); +XBT_PRIVATE void TRACE_generate_viva_cat_conf (); +XBT_PRIVATE void instr_pause_tracing (); +XBT_PRIVATE void instr_resume_tracing (); /* Public functions used in SMPI */ -XBT_PUBLIC(bool) TRACE_smpi_is_enabled(void); -XBT_PUBLIC(bool) TRACE_smpi_is_grouped(void); -XBT_PUBLIC(bool) TRACE_smpi_is_computing(void); -XBT_PUBLIC(bool) TRACE_smpi_is_sleeping(void); -XBT_PUBLIC(bool) TRACE_smpi_view_internals(void); +XBT_PUBLIC(bool) TRACE_smpi_is_enabled(); +XBT_PUBLIC(bool) TRACE_smpi_is_grouped(); +XBT_PUBLIC(bool) TRACE_smpi_is_computing(); +XBT_PUBLIC(bool) TRACE_smpi_is_sleeping(); +XBT_PUBLIC(bool) TRACE_smpi_view_internals(); /* from resource_utilization.c */ XBT_PRIVATE void TRACE_surf_host_set_utilization(const char *resource, const char *category, double value, double now, double delta); XBT_PRIVATE void TRACE_surf_link_set_utilization(const char *resource,const char *category, double value, double now, double delta); -XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc(void); +XBT_PUBLIC(void) TRACE_surf_resource_utilization_alloc(); /* instr_paje.c */ extern XBT_PRIVATE xbt_dict_t trivaNodeTypes; extern XBT_PRIVATE xbt_dict_t trivaEdgeTypes; -XBT_PRIVATE long long int instr_new_paje_id (void); -XBT_PRIVATE void PJ_container_alloc (void); -XBT_PRIVATE void PJ_container_release (void); +XBT_PRIVATE long long int instr_new_paje_id (); +XBT_PRIVATE void PJ_container_alloc (); +XBT_PRIVATE void PJ_container_release (); XBT_PUBLIC(container_t) PJ_container_new (const char *name, e_container_types kind, container_t father); XBT_PUBLIC(container_t) PJ_container_get (const char *name); XBT_PUBLIC(container_t) PJ_container_get_or_null (const char *name); -XBT_PUBLIC(container_t) PJ_container_get_root (void); +XBT_PUBLIC(container_t) PJ_container_get_root (); XBT_PUBLIC(void) PJ_container_set_root (container_t root); XBT_PUBLIC(void) PJ_container_free (container_t container); XBT_PUBLIC(void) PJ_container_free_all (void); XBT_PUBLIC(void) PJ_container_remove_from_parent (container_t container); /* instr_paje_types.c */ -XBT_PRIVATE void PJ_type_alloc (void); -XBT_PRIVATE void PJ_type_release (void); -XBT_PUBLIC(type_t) PJ_type_get_root (void); +XBT_PRIVATE void PJ_type_alloc (); +XBT_PRIVATE void PJ_type_release (); +XBT_PUBLIC(type_t) PJ_type_get_root (); XBT_PRIVATE type_t PJ_type_container_new (const char *name, type_t father); XBT_PRIVATE type_t PJ_type_event_new (const char *name, type_t father); type_t PJ_type_link_new (const char *name, type_t father, type_t source, type_t dest); @@ -339,7 +339,7 @@ XBT_PRIVATE XBT_PRIVATE type_t PJ_type_variable_new (const char *name, const cha XBT_PRIVATE type_t PJ_type_state_new (const char *name, type_t father); XBT_PUBLIC(type_t) PJ_type_get (const char *name, const type_t father); XBT_PUBLIC(type_t) PJ_type_get_or_null (const char *name, type_t father); -void PJ_type_free_all (void); +void PJ_type_free_all (); XBT_PRIVATE XBT_PRIVATE void PJ_type_free (type_t type); /* instr_paje_values.c */ @@ -370,9 +370,9 @@ XBT_PRIVATE void print_pajeNewEvent (paje_event_t event); XBT_PRIVATE void print_TIPushState(paje_event_t event); XBT_PRIVATE void print_TICreateContainer(paje_event_t event); XBT_PRIVATE void print_TIDestroyContainer(paje_event_t event); -XBT_PRIVATE void TRACE_TI_start(void); -XBT_PRIVATE void TRACE_TI_end(void); -XBT_PRIVATE void TRACE_TI_init(void); +XBT_PRIVATE void TRACE_TI_start(); +XBT_PRIVATE void TRACE_TI_end(); +XBT_PRIVATE void TRACE_TI_init(); XBT_PRIVATE void print_NULL (paje_event_t event); XBT_PRIVATE void TRACE_paje_dump_buffer (int force); diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index a40fa0c1d4..d650e2085a 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -101,13 +101,13 @@ AttachContext::~AttachContext() }}} /** @brief Executes all the processes to run (in parallel if possible). */ -void SIMIX_context_runall(void) +void SIMIX_context_runall() { simix_global->context_factory->run_all(); } /** @brief returns the current running context */ -smx_context_t SIMIX_context_self(void) +smx_context_t SIMIX_context_self() { if (simix_global && simix_global->context_factory) return simix_global->context_factory->self(); diff --git a/src/kernel/context/Context.hpp b/src/kernel/context/Context.hpp index eab87f8071..afe7200fa0 100644 --- a/src/kernel/context/Context.hpp +++ b/src/kernel/context/Context.hpp @@ -135,7 +135,7 @@ namespace context { }; /* This allows Java to hijack the context factory (Java induces factories of factory :) */ -typedef ContextFactory* (*ContextFactoryInitializer)(void); +typedef ContextFactory* (*ContextFactoryInitializer)(); XBT_PUBLIC_DATA(ContextFactoryInitializer) factory_initializer; XBT_PRIVATE ContextFactory* thread_factory(); @@ -150,8 +150,8 @@ typedef simgrid::kernel::context::ContextFactory *smx_context_factory_t; SG_BEGIN_DECL() -XBT_PRIVATE void SIMIX_context_mod_init(void); -XBT_PRIVATE void SIMIX_context_mod_exit(void); +XBT_PRIVATE void SIMIX_context_mod_init(); +XBT_PRIVATE void SIMIX_context_mod_exit(); XBT_PRIVATE smx_context_t SIMIX_context_new( std::function code, @@ -173,19 +173,19 @@ XBT_PUBLIC_DATA(char sigsegv_stack[SIGSTKSZ]); #endif /** @brief Executes all the processes to run (in parallel if possible). */ -XBT_PRIVATE void SIMIX_context_runall(void); +XBT_PRIVATE void SIMIX_context_runall(); /** @brief returns the current running context */ -XBT_PUBLIC(smx_context_t) SIMIX_context_self(void); // public because it's used in simgrid-java +XBT_PUBLIC(smx_context_t) SIMIX_context_self(); // public because it's used in simgrid-java -XBT_PRIVATE void *SIMIX_context_stack_new(void); +XBT_PRIVATE void *SIMIX_context_stack_new(); XBT_PRIVATE void SIMIX_context_stack_delete(void *stack); XBT_PRIVATE void SIMIX_context_set_current(smx_context_t context); -XBT_PRIVATE smx_context_t SIMIX_context_get_current(void); +XBT_PRIVATE smx_context_t SIMIX_context_get_current(); -XBT_PUBLIC(int) SIMIX_process_get_maxpid(void); +XBT_PUBLIC(int) SIMIX_process_get_maxpid(); -XBT_PRIVATE void SIMIX_post_create_environment(void); +XBT_PRIVATE void SIMIX_post_create_environment(); SG_END_DECL() diff --git a/src/mc/Client.hpp b/src/mc/Client.hpp index 9c6c642a24..4f8071ecbe 100644 --- a/src/mc/Client.hpp +++ b/src/mc/Client.hpp @@ -37,7 +37,7 @@ public: void handleMessages(); Channel const& getChannel() const { return channel_; } Channel& getChannel() { return channel_; } - void mainLoop(void); + void mainLoop(); void reportAssertionFailure(const char* description = nullptr); void ignoreMemory(void* addr, std::size_t size); void ignoreHeap(void* addr, std::size_t size); diff --git a/src/mc/mc_base.h b/src/mc/mc_base.h index 5d9baa02f3..095b6992fd 100644 --- a/src/mc/mc_base.h +++ b/src/mc/mc_base.h @@ -34,7 +34,7 @@ XBT_PRIVATE bool request_is_enabled(smx_simcall_t req); * iteratively until there doesn't remain any. At this point, the function * returns to the caller which can handle the visible (and ready) simcalls. */ -XBT_PRIVATE void wait_for_requests(void); +XBT_PRIVATE void wait_for_requests(); XBT_PRIVATE extern std::vector processes_time; diff --git a/src/mc/mc_replay.h b/src/mc/mc_replay.h index f9324c8f27..ad7a98d3d9 100644 --- a/src/mc/mc_replay.h +++ b/src/mc/mc_replay.h @@ -18,7 +18,7 @@ SG_BEGIN_DECL() XBT_PUBLIC_DATA(char*) MC_record_path; /** Whether the replay mode is enabled */ -static inline int MC_record_replay_is_active(void) { +static inline int MC_record_replay_is_active() { return MC_record_path != 0; } diff --git a/src/msg/instr_msg_task.cpp b/src/msg/instr_msg_task.cpp index 86e05eea44..c450a220c0 100644 --- a/src/msg/instr_msg_task.cpp +++ b/src/msg/instr_msg_task.cpp @@ -83,7 +83,7 @@ void TRACE_msg_task_destroy(msg_task_t task) } /* MSG_task_get related functions */ -void TRACE_msg_task_get_start(void) +void TRACE_msg_task_get_start() { XBT_DEBUG("GET,in"); @@ -140,7 +140,7 @@ int TRACE_msg_task_put_start(msg_task_t task) return 1; } -void TRACE_msg_task_put_end(void) +void TRACE_msg_task_put_end() { XBT_DEBUG("PUT,out"); diff --git a/src/msg/msg_environment.cpp b/src/msg/msg_environment.cpp index feeb629ea5..5e29b9705c 100644 --- a/src/msg/msg_environment.cpp +++ b/src/msg/msg_environment.cpp @@ -38,7 +38,7 @@ void MSG_create_environment(const char *file) SIMIX_create_environment(file); } -void MSG_post_create_environment(void) { +void MSG_post_create_environment() { xbt_lib_cursor_t cursor; void **data; char *name; diff --git a/src/msg/msg_io.cpp b/src/msg/msg_io.cpp index 3a2037d75b..f6ef539010 100644 --- a/src/msg/msg_io.cpp +++ b/src/msg/msg_io.cpp @@ -517,7 +517,7 @@ msg_storage_t MSG_storage_get_by_name(const char *name) /** \ingroup msg_storage_management * \brief Returns a dynar containing all the storage elements declared at a given point of time */ -xbt_dynar_t MSG_storages_as_dynar(void) { +xbt_dynar_t MSG_storages_as_dynar() { xbt_lib_cursor_t cursor; char *key; void **data; diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index 82ee1b0684..4b799d83a0 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -150,7 +150,7 @@ XBT_PRIVATE smx_process_t MSG_process_create_from_SIMIX(const char *name, smx_process_t parent_process); XBT_PRIVATE void MSG_comm_copy_data_from_SIMIX(smx_synchro_t comm, void* buff, size_t buff_size); -XBT_PRIVATE void MSG_post_create_environment(void); +XBT_PRIVATE void MSG_post_create_environment(); XBT_PRIVATE void MSG_host_add_task(msg_host_t host, msg_task_t task); XBT_PRIVATE void MSG_host_del_task(msg_host_t host, msg_task_t task); @@ -163,9 +163,9 @@ XBT_PRIVATE void TRACE_msg_task_execute_start(msg_task_t task); XBT_PRIVATE void TRACE_msg_task_execute_end(msg_task_t task); XBT_PRIVATE void TRACE_msg_task_destroy(msg_task_t task); XBT_PRIVATE void TRACE_msg_task_get_end(double start_time, msg_task_t task); -XBT_PRIVATE void TRACE_msg_task_get_start(void); +XBT_PRIVATE void TRACE_msg_task_get_start(); XBT_PRIVATE int TRACE_msg_task_put_start(msg_task_t task); //returns TRUE if the task_put_end must be called -XBT_PRIVATE void TRACE_msg_task_put_end(void); +XBT_PRIVATE void TRACE_msg_task_put_end(); /* declaration of instrumentation functions from msg_process_instr.c */ XBT_PRIVATE char *instr_process_id (msg_process_t proc, char *str, int len); diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index cf775374c6..baf54c810d 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -214,7 +214,7 @@ msg_process_t MSG_process_attach(const char *name, void *data, msg_host_t host, * Used in the main thread, it waits for the simulation to finish before returning. When it returns, the other * simulated processes and the maestro are destroyed. */ -void MSG_process_detach(void) +void MSG_process_detach() { SIMIX_process_detach(); } @@ -332,12 +332,12 @@ msg_process_t MSG_process_from_PID(int PID) } /** @brief returns a list of all currently existing processes */ -xbt_dynar_t MSG_processes_as_dynar(void) { +xbt_dynar_t MSG_processes_as_dynar() { return SIMIX_processes_as_dynar(); } /** @brief Return the current number MSG processes. */ -int MSG_process_get_number(void) +int MSG_process_get_number() { return SIMIX_process_count(); } @@ -417,7 +417,7 @@ xbt_dict_t MSG_process_get_properties(msg_process_t process) * * This function returns the PID of the currently running #msg_process_t. */ -int MSG_process_self_PID(void) +int MSG_process_self_PID() { return MSG_process_get_PID(MSG_process_self()); } @@ -427,7 +427,7 @@ int MSG_process_self_PID(void) * * This function returns the PID of the parent of the currently running #msg_process_t. */ -int MSG_process_self_PPID(void) +int MSG_process_self_PPID() { return MSG_process_get_PPID(MSG_process_self()); } @@ -437,7 +437,7 @@ int MSG_process_self_PPID(void) * * This function returns the currently running #msg_process_t. */ -msg_process_t MSG_process_self(void) +msg_process_t MSG_process_self() { return SIMIX_process_self(); } diff --git a/src/simdag/sd_daxloader.cpp b/src/simdag/sd_daxloader.cpp index 2cbfc81c4a..31f7e795f6 100644 --- a/src/simdag/sd_daxloader.cpp +++ b/src/simdag/sd_daxloader.cpp @@ -305,7 +305,7 @@ void STag_dax__job() xbt_dynar_push(result, ¤t_job); } -void STag_dax__uses(void) +void STag_dax__uses() { double size = xbt_str_parse_double(A_dax__uses_size, "Parse error: %s is not a double"); int is_input = (A_dax__uses_link == A_dax__uses_link_input); diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 7d386319d5..701b7f469c 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -28,7 +28,7 @@ size_t sg_host_count() * internally). * \see sg_host_count() */ -sg_host_t *sg_host_list(void) { +sg_host_t *sg_host_list() { xbt_assert(sg_host_count() > 0, "There is no host!"); return (sg_host_t*)xbt_dynar_to_array(sg_hosts_as_dynar()); } @@ -53,7 +53,7 @@ sg_host_t sg_host_by_name(const char *name) return simgrid::s4u::Host::by_name_or_null(name); } -xbt_dynar_t sg_hosts_as_dynar(void) +xbt_dynar_t sg_hosts_as_dynar() { xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t),nullptr); diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index 63b35791e6..925d6cc12c 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -646,7 +646,7 @@ void sg_config_init(int *argc, char **argv) } } -void sg_config_finalize(void) +void sg_config_finalize() { if (!_sg_cfg_init_status) return; /* Not initialized yet. Nothing to do */ diff --git a/src/simix/ActorImpl.hpp b/src/simix/ActorImpl.hpp index 53cb95ac4d..213cd6b47d 100644 --- a/src/simix/ActorImpl.hpp +++ b/src/simix/ActorImpl.hpp @@ -116,12 +116,12 @@ XBT_PRIVATE smx_process_t SIMIX_process_create( int auto_restart, smx_process_t parent_process); -XBT_PRIVATE void SIMIX_process_runall(void); +XBT_PRIVATE void SIMIX_process_runall(); XBT_PRIVATE void SIMIX_process_kill(smx_process_t process, smx_process_t issuer); XBT_PRIVATE void SIMIX_process_killall(smx_process_t issuer, int reset_pid); XBT_PRIVATE void SIMIX_process_stop(smx_process_t arg); XBT_PRIVATE void SIMIX_process_cleanup(smx_process_t arg); -XBT_PRIVATE void SIMIX_process_empty_trash(void); +XBT_PRIVATE void SIMIX_process_empty_trash(); XBT_PRIVATE void SIMIX_process_yield(smx_process_t self); XBT_PRIVATE void SIMIX_process_exception_terminate(xbt_ex_t * e); XBT_PRIVATE void SIMIX_process_change_host(smx_process_t process, sg_host_t dest); diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 4d68d3d7d0..eaf002e6b8 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -439,7 +439,7 @@ void simcall_process_resume(smx_process_t process) * * Maestro internal process is not counted, only user code processes are */ -int simcall_process_count(void) +int simcall_process_count() { return simgrid::simix::kernelImmediate(SIMIX_process_count); } @@ -744,7 +744,7 @@ int simcall_comm_test(smx_synchro_t comm) * \ingroup simix_synchro_management * */ -smx_mutex_t simcall_mutex_init(void) +smx_mutex_t simcall_mutex_init() { if(!simix_global) { fprintf(stderr,"You must run MSG_init before using MSG\n"); // We can't use xbt_die since we may get there before the initialization @@ -784,7 +784,7 @@ void simcall_mutex_unlock(smx_mutex_t mutex) * \ingroup simix_synchro_management * */ -smx_cond_t simcall_cond_init(void) +smx_cond_t simcall_cond_init() { return simcall_BODY_cond_init(); } diff --git a/src/simix/smx_context.cpp b/src/simix/smx_context.cpp index 148f66ea42..0238f90c51 100644 --- a/src/simix/smx_context.cpp +++ b/src/simix/smx_context.cpp @@ -97,7 +97,7 @@ static e_xbt_parmap_mode_t smx_parallel_synchronization_mode = XBT_PARMAP_DEFAUL /** * This function is called by SIMIX_global_init() to initialize the context module. */ -void SIMIX_context_mod_init(void) +void SIMIX_context_mod_init() { xbt_assert(simix_global->context_factory == nullptr); @@ -144,13 +144,13 @@ void SIMIX_context_mod_init(void) /** * This function is called by SIMIX_clean() to finalize the context module. */ -void SIMIX_context_mod_exit(void) +void SIMIX_context_mod_exit() { delete simix_global->context_factory; simix_global->context_factory = nullptr; } -void *SIMIX_context_stack_new(void) +void *SIMIX_context_stack_new() { void *stack; @@ -231,7 +231,7 @@ void SIMIX_context_stack_delete(void *stack) } /** @brief Returns whether some parallel threads are used for the user contexts. */ -int SIMIX_context_is_parallel(void) { +int SIMIX_context_is_parallel() { return smx_parallel_contexts > 1; } @@ -239,7 +239,7 @@ int SIMIX_context_is_parallel(void) { * @brief Returns the number of parallel threads used for the user contexts. * \return the number of threads (1 means no parallelism) */ -int SIMIX_context_get_nthreads(void) { +int SIMIX_context_get_nthreads() { return smx_parallel_contexts; } @@ -273,7 +273,7 @@ void SIMIX_context_set_nthreads(int nb_threads) { * \return when the number of user processes ready to run is above * this threshold, they are run in parallel */ -int SIMIX_context_get_parallel_threshold(void) { +int SIMIX_context_get_parallel_threshold() { return smx_parallel_threshold; } @@ -295,7 +295,7 @@ void SIMIX_context_set_parallel_threshold(int threshold) { * parallel. * \return how threads are synchronized if processes are run in parallel */ -e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode(void) { +e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode() { return smx_parallel_synchronization_mode; } @@ -312,7 +312,7 @@ void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode) { * \brief Returns the current context of this thread. * \return the current context of this thread */ -smx_context_t SIMIX_context_get_current(void) +smx_context_t SIMIX_context_get_current() { if (SIMIX_context_is_parallel()) { #if HAVE_THREAD_LOCAL_STORAGE diff --git a/src/simix/smx_deployment.cpp b/src/simix/smx_deployment.cpp index b7bd180750..b688ebd41c 100644 --- a/src/simix/smx_deployment.cpp +++ b/src/simix/smx_deployment.cpp @@ -14,12 +14,11 @@ #include "xbt/dict.h" #include "src/surf/xml/platf_private.hpp" // FIXME: KILLME. There must be a better way than mimicking XML here -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_deployment, simix, - "Logging specific to SIMIX (deployment)"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_deployment, simix, "Logging specific to SIMIX (deployment)"); extern int surf_parse_lineno; -void SIMIX_init_application(void) +void SIMIX_init_application() { sg_platf_exit(); sg_platf_init(); @@ -42,8 +41,7 @@ void SIMIX_init_application(void) void SIMIX_launch_application(const char *file) { XBT_ATTRIB_UNUSED int parse_status; - xbt_assert(simix_global, - "SIMIX_global_init has to be called before SIMIX_launch_application."); + xbt_assert(simix_global, "SIMIX_global_init has to be called before SIMIX_launch_application."); SIMIX_init_application(); @@ -165,4 +163,4 @@ void registerFunction(const char* name, ActorCodeFactory factory) } } -} \ No newline at end of file +} diff --git a/src/simix/smx_environment.cpp b/src/simix/smx_environment.cpp index eb362756b0..f6c0fd95cf 100644 --- a/src/simix/smx_environment.cpp +++ b/src/simix/smx_environment.cpp @@ -11,8 +11,7 @@ #include "xbt/xbt_os_time.h" #include "xbt/config.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, - "Logging specific to SIMIX (environment)"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, "Logging specific to SIMIX (environment)"); /********************************* SIMIX **************************************/ @@ -47,7 +46,7 @@ void SIMIX_create_environment(const char *file) XBT_DEBUG("PARSE TIME: %g", (end - start)); } -void SIMIX_post_create_environment(void) +void SIMIX_post_create_environment() { surf_presolve(); } diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index c2229a7c9b..3c94c9dd75 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -118,7 +118,7 @@ char sigsegv_stack[SIGSTKSZ]; /* alternate stack for SIGSEGV handler */ * Install signal handler for SIGSEGV. Check that nobody has already installed * its own handler. For example, the Java VM does this. */ -static void install_segvhandler(void) +static void install_segvhandler() { stack_t stack, old_stack; stack.ss_sp = sigsegv_stack; @@ -155,7 +155,7 @@ static void install_segvhandler(void) #endif /* _WIN32 */ /********************************* SIMIX **************************************/ -double SIMIX_timer_next(void) +double SIMIX_timer_next() { return xbt_heap_size(simix_timers) > 0 ? xbt_heap_maxkey(simix_timers) : -1.0; } @@ -263,7 +263,7 @@ int smx_cleaned = 0; * * This functions remove the memory used by SIMIX */ -void SIMIX_clean(void) +void SIMIX_clean() { if (smx_cleaned) return; // to avoid double cleaning by java and C @@ -327,7 +327,7 @@ void SIMIX_clean(void) * * \return Return the clock. */ -double SIMIX_get_clock(void) +double SIMIX_get_clock() { if(MC_is_active() || MC_record_replay_is_active()){ return MC_process_clock_get(SIMIX_process_self()); @@ -423,7 +423,7 @@ static bool SIMIX_execute_tasks() * \ingroup SIMIX_API * \brief Run the main simulation loop. */ -void SIMIX_run(void) +void SIMIX_run() { if (MC_record_path) { simgrid::mc::replay(MC_record_path); @@ -639,7 +639,7 @@ void SIMIX_function_register_process_cleanup(void_pfn_smxprocess_t } -void SIMIX_display_process_status(void) +void SIMIX_display_process_status() { if (simix_global->process_list == nullptr) { return; diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index 5d534ba5ef..7bc45b9361 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -128,14 +128,14 @@ void SIMIX_host_destroy(void *h) return; } -sg_host_t SIMIX_host_self(void) +sg_host_t SIMIX_host_self() { smx_process_t process = SIMIX_process_self(); return (process == nullptr) ? nullptr : process->host; } /* needs to be public and without simcall for exceptions and logging events */ -const char* SIMIX_host_self_get_name(void) +const char* SIMIX_host_self_get_name() { sg_host_t host = SIMIX_host_self(); if (host == nullptr || SIMIX_process_self() == simix_global->maestro_process) diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 722116e54c..ffc2f72786 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -33,7 +33,7 @@ static smx_synchro_t _find_matching_comm(std::deque *deque, e_smx int (*match_fun)(void *, void *,smx_synchro_t), void *user_data, smx_synchro_t my_synchro, bool remove_matching); static void SIMIX_comm_start(smx_synchro_t synchro); -void SIMIX_mailbox_exit(void) +void SIMIX_mailbox_exit() { xbt_dict_free(&mailboxes); } diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 630fa4e24c..6cdbe6f0a6 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -42,7 +42,7 @@ public: } } -XBT_PRIVATE void SIMIX_mailbox_exit(void); +XBT_PRIVATE void SIMIX_mailbox_exit(); XBT_PRIVATE smx_mailbox_t SIMIX_mbox_create(const char *name); XBT_PRIVATE smx_mailbox_t SIMIX_mbox_get_by_name(const char *name); diff --git a/src/simix/smx_private.h b/src/simix/smx_private.h index 74e67b33e8..0c08be8ac6 100644 --- a/src/simix/smx_private.h +++ b/src/simix/smx_private.h @@ -74,7 +74,7 @@ SG_BEGIN_DECL() XBT_PUBLIC_DATA(std::unique_ptr) simix_global; -XBT_PUBLIC(void) SIMIX_clean(void); +XBT_PUBLIC(void) SIMIX_clean(); /******************************** Exceptions *********************************/ /** @brief Ask to the provided simix process to raise the provided exception */ diff --git a/src/simix/smx_synchro.cpp b/src/simix/smx_synchro.cpp index 81017c1cff..adcb7b5060 100644 --- a/src/simix/smx_synchro.cpp +++ b/src/simix/smx_synchro.cpp @@ -12,8 +12,7 @@ #include "src/kernel/activity/SynchroRaw.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix, - "SIMIX Synchronization (mutex, semaphores and conditions)"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix, "SIMIX Synchronization (mutex, semaphores and conditions)"); static smx_synchro_t SIMIX_synchro_wait(sg_host_t smx_host, double timeout); static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout, @@ -234,7 +233,7 @@ void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex) * It have to be called before the use of the condition. * \return A condition */ -smx_cond_t SIMIX_cond_init(void) +smx_cond_t SIMIX_cond_init() { XBT_IN("()"); simgrid::simix::ActorImpl p; diff --git a/src/simix/smx_synchro_private.h b/src/simix/smx_synchro_private.h index 25c898bbe1..75786ce6d8 100644 --- a/src/simix/smx_synchro_private.h +++ b/src/simix/smx_synchro_private.h @@ -80,7 +80,7 @@ XBT_PRIVATE void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t XBT_PRIVATE void SIMIX_synchro_destroy(smx_synchro_t synchro); XBT_PRIVATE void SIMIX_synchro_finish(smx_synchro_t synchro); -XBT_PRIVATE smx_cond_t SIMIX_cond_init(void); +XBT_PRIVATE smx_cond_t SIMIX_cond_init(); XBT_PRIVATE void SIMIX_cond_broadcast(smx_cond_t cond); XBT_PRIVATE void SIMIX_cond_signal(smx_cond_t cond); XBT_PRIVATE void intrusive_ptr_add_ref(s_smx_cond_t *cond); diff --git a/src/smpi/instr_smpi.cpp b/src/smpi/instr_smpi.cpp index 41134dbb3a..4c6054230f 100644 --- a/src/smpi/instr_smpi.cpp +++ b/src/smpi/instr_smpi.cpp @@ -171,7 +171,7 @@ void TRACE_internal_smpi_set_category (const char *category) xbt_dict_set (process_category, processid, xbt_strdup(category), nullptr); } -const char *TRACE_internal_smpi_get_category (void) +const char *TRACE_internal_smpi_get_category () { if (!TRACE_smpi_is_enabled()) return nullptr; @@ -187,7 +187,7 @@ void TRACE_smpi_alloc() process_category = xbt_dict_new_homogeneous(xbt_free_f); } -void TRACE_smpi_release(void) +void TRACE_smpi_release() { xbt_dict_free(&keys); xbt_dict_free(&process_category); diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index adbbd3d441..e21d2463ac 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -186,7 +186,7 @@ static void* shm_map(int fd, size_t size, shared_data_key_type* data) { } #endif -void smpi_bench_destroy(void) +void smpi_bench_destroy() { allocs.clear(); allocs_metadata.clear(); @@ -235,7 +235,7 @@ void smpi_execute(double duration) } } -void smpi_bench_begin(void) +void smpi_bench_begin() { if (smpi_privatize_global_variables) { smpi_switch_data_segment(smpi_process_index()); @@ -260,7 +260,7 @@ void smpi_bench_begin(void) xbt_os_threadtimer_start(smpi_process_timer()); } -void smpi_bench_end(void) +void smpi_bench_end() { if (MC_is_active() || MC_record_replay_is_active()) return; @@ -403,7 +403,7 @@ int smpi_clock_gettime(clockid_t clk_id, struct timespec *tp) #endif extern double sg_surf_precision; -unsigned long long smpi_rastro_resolution (void) +unsigned long long smpi_rastro_resolution () { smpi_bench_end(); double resolution = (1/sg_surf_precision); @@ -411,7 +411,7 @@ unsigned long long smpi_rastro_resolution (void) return static_cast(resolution); } -unsigned long long smpi_rastro_timestamp (void) +unsigned long long smpi_rastro_timestamp () { smpi_bench_end(); double now = SIMIX_get_clock(); diff --git a/src/smpi/smpi_coll.cpp b/src/smpi/smpi_coll.cpp index a8bcf997a4..df33a61663 100644 --- a/src/smpi/smpi_coll.cpp +++ b/src/smpi/smpi_coll.cpp @@ -168,11 +168,10 @@ int (*mpi_coll_reduce_fun)(void *buf, void *rbuf, int count, MPI_Datatype dataty int (*mpi_coll_reduce_scatter_fun)(void *sbuf, void *rbuf, int *rcounts,MPI_Datatype dtype,MPI_Op op,MPI_Comm comm); int (*mpi_coll_scatter_fun)(void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype,int root, MPI_Comm comm); int (*mpi_coll_barrier_fun)(MPI_Comm comm); -void (*smpi_coll_cleanup_callback)(void); +void (*smpi_coll_cleanup_callback)(); -int smpi_coll_tuned_alltoall_ompi2(void *sendbuf, int sendcount, - MPI_Datatype sendtype, void *recvbuf, +int smpi_coll_tuned_alltoall_ompi2(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) { @@ -181,19 +180,13 @@ int smpi_coll_tuned_alltoall_ompi2(void *sendbuf, int sendcount, sendsize = smpi_datatype_size(sendtype) * sendcount; if (sendsize < 200 && size > 12) { return - smpi_coll_tuned_alltoall_bruck(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, - comm); + smpi_coll_tuned_alltoall_bruck(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); } else if (sendsize < 3000) { return - smpi_coll_tuned_alltoall_basic_linear(sendbuf, sendcount, - sendtype, recvbuf, - recvcount, recvtype, comm); + smpi_coll_tuned_alltoall_basic_linear(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); } else { return - smpi_coll_tuned_alltoall_ring(sendbuf, sendcount, sendtype, - recvbuf, recvcount, recvtype, - comm); + smpi_coll_tuned_alltoall_ring(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); } } @@ -348,10 +341,8 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, smpi_datatype_extent(recvtype, &lb, &recvext); /* Local copy from self */ err = - smpi_datatype_copy(static_cast(sendbuf) + senddisps[rank] * sendext, - sendcounts[rank], sendtype, - static_cast(recvbuf) + recvdisps[rank] * recvext, - recvcounts[rank], recvtype); + smpi_datatype_copy(static_cast(sendbuf) + senddisps[rank] * sendext, sendcounts[rank], sendtype, + static_cast(recvbuf) + recvdisps[rank] * recvext, recvcounts[rank], recvtype); if (err == MPI_SUCCESS && size > 1) { /* Initiate all send/recv to/from others. */ requests = xbt_new(MPI_Request, 2 * (size - 1)); @@ -364,9 +355,7 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, recvcounts[i], recvtype, i, system_tag, comm); count++; }else{ - XBT_DEBUG - ("<%d> skip request creation [src = %d, recvcounts[src] = %d]", - rank, i, recvcounts[i]); + XBT_DEBUG("<%d> skip request creation [src = %d, recvcounts[src] = %d]", rank, i, recvcounts[i]); } } /* Now create all sends */ @@ -377,9 +366,7 @@ int smpi_coll_basic_alltoallv(void *sendbuf, int *sendcounts, sendcounts[i], sendtype, i, system_tag, comm); count++; }else{ - XBT_DEBUG - ("<%d> skip request creation [dst = %d, sendcounts[dst] = %d]", - rank, i, sendcounts[i]); + XBT_DEBUG("<%d> skip request creation [dst = %d, sendcounts[dst] = %d]", rank, i, sendcounts[i]); } } /* Wait for them all. */ diff --git a/src/smpi/smpi_f77.cpp b/src/smpi/smpi_f77.cpp index 8786829f4c..248334e80c 100644 --- a/src/smpi/smpi_f77.cpp +++ b/src/smpi/smpi_f77.cpp @@ -303,11 +303,11 @@ void mpi_comm_size_(int* comm, int* size, int* ierr) { *ierr = MPI_Comm_size(smpi_comm_f2c(*comm), size); } -double mpi_wtime_(void) { +double mpi_wtime_() { return MPI_Wtime(); } -double mpi_wtick_(void) { +double mpi_wtick_() { return MPI_Wtick(); } diff --git a/src/smpi/smpi_memory.cpp b/src/smpi/smpi_memory.cpp index eb6a52bddf..ec7ee46b18 100644 --- a/src/smpi/smpi_memory.cpp +++ b/src/smpi/smpi_memory.cpp @@ -27,7 +27,7 @@ static const int PROT_RWX = (PROT_READ | PROT_WRITE | PROT_EXEC); static const int PROT_RW = (PROT_READ | PROT_WRITE ); XBT_ATTRIB_UNUSED static const int PROT_RX = (PROT_READ | PROT_EXEC ); -void smpi_get_executable_global_size(void) +void smpi_get_executable_global_size() { char buffer[PATH_MAX]; char* full_name = realpath(xbt_binary_name, buffer); diff --git a/src/smpi/smpi_pmpi.cpp b/src/smpi/smpi_pmpi.cpp index eb4e4909e9..1f4add0efb 100644 --- a/src/smpi/smpi_pmpi.cpp +++ b/src/smpi/smpi_pmpi.cpp @@ -47,7 +47,7 @@ int PMPI_Init(int *argc, char ***argv) return MPI_SUCCESS; } -int PMPI_Finalize(void) +int PMPI_Finalize() { smpi_bench_end(); int rank = smpi_process_index(); @@ -128,13 +128,13 @@ int PMPI_Abort(MPI_Comm comm, int errorcode) return MPI_SUCCESS; } -double PMPI_Wtime(void) +double PMPI_Wtime() { return smpi_mpi_wtime(); } extern double sg_maxmin_precision; -double PMPI_Wtick(void) +double PMPI_Wtick() { return sg_maxmin_precision; } diff --git a/src/smpi/smpi_static_variables.cpp b/src/smpi/smpi_static_variables.cpp index cd0dff367a..19fcd99f1e 100644 --- a/src/smpi/smpi_static_variables.cpp +++ b/src/smpi/smpi_static_variables.cpp @@ -24,7 +24,7 @@ void smpi_register_static(void* arg, void_f_pvoid_t free_fn) { registered_static_variables_stack.push(elm); } -void smpi_free_static(void) { +void smpi_free_static() { while (!registered_static_variables_stack.empty()) { s_smpi_static_t elm = registered_static_variables_stack.top(); elm.free_fn(elm.ptr); diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index e76df1daac..b7241b2567 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -24,7 +24,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host); * Model * *********/ -void surf_host_model_init_current_default(void) +void surf_host_model_init_current_default() { surf_host_model = new simgrid::surf::HostCLM03Model(); xbt_cfg_setdefault_boolean("network/crosstraffic", "yes"); diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 04bd5f7425..ca2809b283 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -24,7 +24,6 @@ static const char *instr_node_name (xbt_node_t node) return str; } - static container_t lowestCommonAncestor (container_t a1, container_t a2) { //this is only an optimization (since most of a1 and a2 share the same parent) @@ -440,7 +439,6 @@ int instr_platform_traced () #define GRAPHICATOR_SUPPORT_FUNCTIONS - static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, AS_t as, container_t container) { @@ -459,7 +457,7 @@ static void recursiveXBTGraphExtraction (xbt_graph_t graph, xbt_dict_t nodes, xb static_cast(as)->getGraph(graph, nodes, edges); } -xbt_graph_t instr_routing_platform_graph (void) +xbt_graph_t instr_routing_platform_graph () { xbt_graph_t ret = xbt_graph_new_graph (0, nullptr); xbt_dict_t nodes = xbt_dict_new_homogeneous(nullptr); diff --git a/src/surf/instr_surf.cpp b/src/surf/instr_surf.cpp index 230805a286..a21da8abe2 100644 --- a/src/surf/instr_surf.cpp +++ b/src/surf/instr_surf.cpp @@ -9,12 +9,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_surf, instr, "Tracing Surf"); -void TRACE_surf_alloc(void) +void TRACE_surf_alloc() { TRACE_surf_resource_utilization_alloc(); } -void TRACE_surf_release(void) +void TRACE_surf_release() { TRACE_surf_resource_utilization_release(); } diff --git a/src/surf/maxmin.cpp b/src/surf/maxmin.cpp index b3b9103844..6645a0d206 100644 --- a/src/surf/maxmin.cpp +++ b/src/surf/maxmin.cpp @@ -26,7 +26,7 @@ double sg_maxmin_precision = 0.00001; double sg_surf_precision = 0.00001; int sg_concurrency_limit= 100; -static void *lmm_variable_mallocator_new_f(void); +static void *lmm_variable_mallocator_new_f(); static void lmm_variable_mallocator_free_f(void *var); #define lmm_variable_mallocator_reset_f ((void_f_pvoid_t)nullptr) static void lmm_update_modified_set(lmm_system_t sys, lmm_constraint_t cnst); @@ -254,7 +254,7 @@ inline void lmm_constraint_free(lmm_system_t sys,lmm_constraint_t cnst) lmm_cnst_free(sys, cnst); } -static void *lmm_variable_mallocator_new_f(void) +static void *lmm_variable_mallocator_new_f() { lmm_variable_t var = xbt_new(s_lmm_variable_t, 1); var->cnsts = nullptr; /* will be created by realloc */ diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 032350e829..77f3801a9f 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -35,7 +35,7 @@ int sg_network_crosstraffic = 0; /* month = Nov, */ /* pdf = {http://hal.inria.fr/hal-00646896/PDF/rr-validity.pdf}, */ /* } */ -void surf_network_model_init_LegrandVelho(void) +void surf_network_model_init_LegrandVelho() { if (surf_network_model) return; @@ -59,7 +59,7 @@ void surf_network_model_init_LegrandVelho(void) /* month = {oct}, */ /* year = {2002} */ /* } */ -void surf_network_model_init_CM02(void) +void surf_network_model_init_CM02() { if (surf_network_model) @@ -83,7 +83,7 @@ void surf_network_model_init_CM02(void) /* journal={{IEEE/ACM} Transactions on Networking}, */ /* volume={11}, number={4}, */ /* } */ -void surf_network_model_init_Reno(void) +void surf_network_model_init_Reno() { if (surf_network_model) return; @@ -100,7 +100,7 @@ void surf_network_model_init_Reno(void) } -void surf_network_model_init_Reno2(void) +void surf_network_model_init_Reno2() { if (surf_network_model) return; @@ -116,7 +116,7 @@ void surf_network_model_init_Reno2(void) xbt_cfg_setdefault_double("network/weight-S", 8775); } -void surf_network_model_init_Vegas(void) +void surf_network_model_init_Vegas() { if (surf_network_model) return; diff --git a/src/surf/network_ib.cpp b/src/surf/network_ib.cpp index 6b199b88a0..2dd9bc4165 100644 --- a/src/surf/network_ib.cpp +++ b/src/surf/network_ib.cpp @@ -80,7 +80,7 @@ static void IB_action_init_callback( /* month=june, */ /* year={2010} */ /* } */ -void surf_network_model_init_IB(void) +void surf_network_model_init_IB() { using simgrid::surf::networkActionStateChangedCallbacks; diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index fd3b806551..00ea637a3d 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -42,13 +42,13 @@ extern "C" { void sg_link_data_set(Link *link,void *data) { link->setData(data); } - int sg_link_count(void) { + int sg_link_count() { return Link::linksCount(); } - Link** sg_link_list(void) { + Link** sg_link_list() { return Link::linksList(); } - void sg_link_exit(void) { + void sg_link_exit() { Link::linksExit(); } diff --git a/src/surf/network_smpi.cpp b/src/surf/network_smpi.cpp index cb80aeef00..bb83b01a34 100644 --- a/src/surf/network_smpi.cpp +++ b/src/surf/network_smpi.cpp @@ -83,9 +83,8 @@ static xbt_dynar_t parse_factor(const char *smpi_coef_string) /* month=may, */ /* year={2011} */ /* } */ -void surf_network_model_init_SMPI(void) +void surf_network_model_init_SMPI() { - if (surf_network_model) return; surf_network_model = new simgrid::surf::NetworkSmpiModel(); diff --git a/src/surf/plugins/energy.cpp b/src/surf/plugins/energy.cpp index c333364b4f..eb06430fe1 100644 --- a/src/surf/plugins/energy.cpp +++ b/src/surf/plugins/energy.cpp @@ -253,7 +253,7 @@ static void onHostDestruction(simgrid::s4u::Host& host) { * \brief Enable energy plugin * \details Enable energy plugin to get joules consumption of each cpu. You should call this function before #MSG_init(). */ -void sg_energy_plugin_init(void) +void sg_energy_plugin_init() { if (HostEnergy::EXTENSION_ID.valid()) return; diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 327d244754..f28844b217 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -20,7 +20,7 @@ XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg); /**************************************/ /*** Resource Creation & Destruction **/ /**************************************/ -void surf_host_model_init_ptask_L07(void) +void surf_host_model_init_ptask_L07() { XBT_CINFO(xbt_cfg,"Switching to the L07 model to handle parallel tasks."); xbt_assert(!surf_cpu_model_pm, "CPU model type already defined"); diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 776ab7add6..f51d08f359 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -95,11 +95,11 @@ static simgrid::kernel::routing::AsImpl* routing_get_current() } /** Module management function: creates all internal data structures */ -void sg_platf_init(void) { +void sg_platf_init() { } /** Module management function: frees all internal data structures */ -void sg_platf_exit(void) { +void sg_platf_exit() { simgrid::surf::on_link.disconnect_all_slots(); simgrid::surf::on_cluster.disconnect_all_slots(); simgrid::surf::on_postparse.disconnect_all_slots(); diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index 20668ded2c..39a791712d 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -54,7 +54,7 @@ void storage_register_callbacks() * Model * *********/ -void surf_storage_model_init_default(void) +void surf_storage_model_init_default() { surf_storage_model = new simgrid::surf::StorageN11Model(); xbt_dynar_push(all_existing_models, &surf_storage_model); diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index b99ded5a68..f3262aeb36 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -27,7 +27,7 @@ static simgrid::surf::VirtualMachine *get_casted_vm(sg_host_t host){ extern double NOW; -void surf_presolve(void) +void surf_presolve() { double next_event_date = -1.0; tmgr_trace_iterator_t event = nullptr; diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 8a2ec6d124..2406d0577a 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -110,7 +110,7 @@ static xbt_parmap_t surf_parmap = nullptr; /* parallel map on models */ double NOW = 0; -double surf_get_clock(void) +double surf_get_clock() { return NOW; } @@ -161,7 +161,7 @@ static const char *disk_drives_letter_table[MAX_DRIVE] = { * directory on Unix/Linux platforms. */ -const char *__surf_get_initial_path(void) +const char *__surf_get_initial_path() { #ifdef _WIN32 @@ -311,7 +311,7 @@ void surf_init(int *argc, char **argv) MC_memory_init(); } -void surf_exit(void) +void surf_exit() { unsigned int iter; simgrid::surf::Model *model = nullptr; diff --git a/src/surf/surf_private.h b/src/surf/surf_private.h index 080e5e2548..1e4e988b12 100644 --- a/src/surf/surf_private.h +++ b/src/surf/surf_private.h @@ -49,13 +49,13 @@ XBT_PRIVATE int __surf_is_absolute_file_path(const char *file_path); extern XBT_PRIVATE simgrid::trace_mgr::future_evt_set *future_evt_set; -XBT_PUBLIC(void) routing_exit(void); -XBT_PUBLIC(void) storage_register_callbacks(void); +XBT_PUBLIC(void) routing_exit(); +XBT_PUBLIC(void) storage_register_callbacks(); XBT_PUBLIC(void) routing_register_callbacks(void); XBT_PUBLIC(void) generic_get_graph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, AS_t rc); -XBT_PRIVATE void parse_after_config(void); +XBT_PRIVATE void parse_after_config(); /********** Tracing **********/ /* from surf_instr.c */ diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index d5771d196f..43f6744801 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -164,7 +164,7 @@ void routing_register_callbacks() } /** \brief Frees all memory allocated by the routing module */ -void routing_exit(void) { +void routing_exit() { delete routing_platf; } diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index 8645ad765d..56b51464c0 100644 --- a/src/surf/surf_routing.hpp +++ b/src/surf/surf_routing.hpp @@ -105,7 +105,7 @@ public: ~RoutingPlatf(); AsImpl *root_ = nullptr; Link *loopback_; - xbt_dynar_t getOneLinkRoutes(void); + xbt_dynar_t getOneLinkRoutes(); void getRouteAndLatency(NetCard *src, NetCard *dst, std::vector * links, double *latency); }; diff --git a/src/surf/trace_mgr.cpp b/src/surf/trace_mgr.cpp index b216946385..e4d1f1404c 100644 --- a/src/surf/trace_mgr.cpp +++ b/src/surf/trace_mgr.cpp @@ -105,7 +105,7 @@ tmgr_trace_t tmgr_trace_new_from_file(const char *filename) return trace; } -tmgr_trace_t tmgr_empty_trace_new(void) +tmgr_trace_t tmgr_empty_trace_new() { tmgr_trace_t trace = new simgrid::trace_mgr::trace(); s_tmgr_event_t event; @@ -179,7 +179,7 @@ tmgr_trace_iterator_t simgrid::trace_mgr::future_evt_set::pop_leq( return trace_iterator; } -void tmgr_finalize(void) +void tmgr_finalize() { for (auto kv : trace_list) { xbt_free((char*)kv.first); diff --git a/src/surf/vm_hl13.cpp b/src/surf/vm_hl13.cpp index 90855a80c6..47bb68d24e 100644 --- a/src/surf/vm_hl13.cpp +++ b/src/surf/vm_hl13.cpp @@ -11,7 +11,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_vm); -void surf_vm_model_init_HL13(void){ +void surf_vm_model_init_HL13(){ if (surf_cpu_model_vm) { surf_vm_model = new simgrid::surf::VMHL13Model(); simgrid::surf::Model *model = surf_vm_model; diff --git a/src/surf/xml/platf.hpp b/src/surf/xml/platf.hpp index e3e81a8c00..be9890daf6 100644 --- a/src/surf/xml/platf.hpp +++ b/src/surf/xml/platf.hpp @@ -15,11 +15,11 @@ SG_BEGIN_DECL() /* Module management functions */ -XBT_PUBLIC(void) sg_platf_init(void); -XBT_PUBLIC(void) sg_platf_exit(void); +XBT_PUBLIC(void) sg_platf_init();; +XBT_PUBLIC(void) sg_platf_exit(); XBT_PUBLIC(void) surf_parse_open(const char *file); -XBT_PUBLIC(void) surf_parse_close(void); +XBT_PUBLIC(void) surf_parse_close(); XBT_PUBLIC(void) surf_parse_assert(bool cond, const char *fmt, ...) XBT_ATTRIB_PRINTF(2,3); XBT_PUBLIC(void) XBT_ATTRIB_NORETURN surf_parse_error(const char *msg,...) XBT_ATTRIB_PRINTF(1,2); XBT_PUBLIC(void) surf_parse_warn(const char *msg,...) XBT_ATTRIB_PRINTF(1,2); @@ -33,7 +33,6 @@ XBT_PUBLIC(double) surf_parse_get_speed(const char *string, const char *entity_k XBT_PUBLIC_DATA(int_f_void_t) surf_parse; /* Entry-point to the parser. Set this to your function. */ - SG_END_DECL() namespace simgrid { diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 01dcc51d61..84ee316fd4 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -198,11 +198,11 @@ typedef struct s_sg_platf_AS_cbarg { void routing_cluster_add_backbone(Link* bb); /*** END of the parsing cruft ***/ -XBT_PUBLIC(void) sg_platf_begin(void); // Start a new platform -XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform +XBT_PUBLIC(void) sg_platf_begin(); // Start a new platform +XBT_PUBLIC(void) sg_platf_end(); // Finish the creation of the platform XBT_PUBLIC(simgrid::s4u::As*) sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS); // Begin description of new AS -XBT_PUBLIC(void) sg_platf_new_AS_seal(void); // That AS is fully described +XBT_PUBLIC(void) sg_platf_new_AS_seal(); // That AS is fully described XBT_PUBLIC(void) sg_platf_new_host (sg_platf_host_cbarg_t host); // Add an host to the currently described AS XBT_PUBLIC(void) sg_platf_new_hostlink(sg_platf_host_link_cbarg_t h); // Add an host_link to the currently described AS @@ -225,18 +225,18 @@ XBT_PUBLIC(void) sg_platf_new_process(sg_platf_process_cbarg_t process); XBT_PRIVATE void sg_platf_trace_connect(sg_platf_trace_connect_cbarg_t trace_connect); /* Prototypes of the functions offered by flex */ -XBT_PUBLIC(int) surf_parse_lex(void); -XBT_PUBLIC(int) surf_parse_get_lineno(void); -XBT_PUBLIC(FILE *) surf_parse_get_in(void); -XBT_PUBLIC(FILE *) surf_parse_get_out(void); -XBT_PUBLIC(yy_size_t) surf_parse_get_leng(void); -XBT_PUBLIC(char *) surf_parse_get_text(void); +XBT_PUBLIC(int) surf_parse_lex(); +XBT_PUBLIC(int) surf_parse_get_lineno(); +XBT_PUBLIC(FILE *) surf_parse_get_in(); +XBT_PUBLIC(FILE *) surf_parse_get_out(); +XBT_PUBLIC(yy_size_t) surf_parse_get_leng(); +XBT_PUBLIC(char *) surf_parse_get_text(); XBT_PUBLIC(void) surf_parse_set_lineno(int line_number); XBT_PUBLIC(void) surf_parse_set_in(FILE * in_str); XBT_PUBLIC(void) surf_parse_set_out(FILE * out_str); -XBT_PUBLIC(int) surf_parse_get_debug(void); +XBT_PUBLIC(int) surf_parse_get_debug(); XBT_PUBLIC(void) surf_parse_set_debug(int bdebug); -XBT_PUBLIC(int) surf_parse_lex_destroy(void); +XBT_PUBLIC(int) surf_parse_lex_destroy(); /* To include files (?) */ XBT_PRIVATE void surfxml_bufferstack_push(int _new); @@ -248,7 +248,7 @@ XBT_PUBLIC(void) routing_route_free(sg_platf_route_cbarg_t route); XBT_PRIVATE void sg_instr_AS_begin(sg_platf_AS_cbarg_t AS); XBT_PRIVATE void sg_instr_new_router(sg_platf_router_cbarg_t router); XBT_PRIVATE void sg_instr_new_host(sg_platf_host_cbarg_t host); -XBT_PRIVATE void sg_instr_AS_end(void); +XBT_PRIVATE void sg_instr_AS_end(); typedef struct s_surf_parsing_link_up_down *surf_parsing_link_up_down_t; typedef struct s_surf_parsing_link_up_down { @@ -256,7 +256,6 @@ typedef struct s_surf_parsing_link_up_down { Link* linkDown; } s_surf_parsing_link_up_down_t; - SG_END_DECL() namespace simgrid { diff --git a/src/xbt/backtrace.cpp b/src/xbt/backtrace.cpp index 8a758370c1..8831610058 100644 --- a/src/xbt/backtrace.cpp +++ b/src/xbt/backtrace.cpp @@ -26,8 +26,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_backtrace, xbt, "Backtrace"); } -/** @brief show the backtrace of the current point (lovely while debuging) */ -void xbt_backtrace_display_current(void) +/** @brief show the backtrace of the current point (lovely while debugging) */ +void xbt_backtrace_display_current() { const std::size_t size = 10; xbt_backtrace_location_t bt[size]; @@ -48,8 +48,7 @@ std::unique_ptr demangle(const char* name) ); if (res != nullptr) return res; - // We did not manage to resolve this. Probably because this is not a mangled - // symbol: + // We did not manage to resolve this. Probably because this is not a mangled symbol: #endif // Return the symbol: return std::unique_ptr(xbt_strdup(name), std::free); diff --git a/src/xbt/backtrace_linux.cpp b/src/xbt/backtrace_linux.cpp index fd51d6b678..94dad3a645 100644 --- a/src/xbt/backtrace_linux.cpp +++ b/src/xbt/backtrace_linux.cpp @@ -35,11 +35,11 @@ extern char **environ; /* the environment, as specified by the opengroup */ /* Module creation/destruction: nothing to do on linux */ -void xbt_backtrace_preinit(void) +void xbt_backtrace_preinit() { } -void xbt_backtrace_postexit(void) +void xbt_backtrace_postexit() { } diff --git a/src/xbt/config.cpp b/src/xbt/config.cpp index 6041903496..49fe4a815b 100644 --- a/src/xbt/config.cpp +++ b/src/xbt/config.cpp @@ -468,7 +468,7 @@ template XBT_PUBLIC(void) declareFlag(const char* name, // ***** C bindings ***** -xbt_cfg_t xbt_cfg_new(void) { return new simgrid::config::Config(); } +xbt_cfg_t xbt_cfg_new() { return new simgrid::config::Config(); } void xbt_cfg_free(xbt_cfg_t * cfg) { delete *cfg; } void xbt_cfg_dump(const char *name, const char *indent, xbt_cfg_t cfg) @@ -515,8 +515,8 @@ void xbt_cfg_register_alias(const char *realname, const char *aliasname) simgrid_config->alias(realname, aliasname); } -void xbt_cfg_aliases(void) { simgrid_config->showAliases(); } -void xbt_cfg_help(void) { simgrid_config->help(); } +void xbt_cfg_aliases() { simgrid_config->showAliases(); } +void xbt_cfg_help() { simgrid_config->help(); } /*----[ Setting ]---------------------------------------------------------*/ diff --git a/src/xbt/cunit.cpp b/src/xbt/cunit.cpp index e9439c2c22..bc18da41a0 100644 --- a/src/xbt/cunit.cpp +++ b/src/xbt/cunit.cpp @@ -620,7 +620,7 @@ int xbt_test_run(char *selection, int verbosity) return _xbt_test_unit_failed; } -void xbt_test_exit(void) +void xbt_test_exit() { xbt_dynar_free(&_xbt_test_suites); } @@ -673,7 +673,7 @@ void xbt_test_exception(xbt_ex_t e) _xbt_test_fail(e.throwPoint().file, e.throwPoint().line, "Exception %s raised: %s", xbt_ex_catname(e.category), e.what()); } -void xbt_test_expect_failure(void) +void xbt_test_expect_failure() { xbt_assert(xbt_dynar_length(_xbt_test_current_unit->tests), "Cannot expect the failure of a test before declaring it (broken unit: %s)", _xbt_test_current_unit->title); @@ -681,7 +681,7 @@ void xbt_test_expect_failure(void) test->expected_failure = 1; } -void xbt_test_skip(void) +void xbt_test_skip() { xbt_assert(xbt_dynar_length(_xbt_test_current_unit->tests), "Test skipped even before being declared (broken unit: %s)", _xbt_test_current_unit->title); diff --git a/src/xbt/dict.cpp b/src/xbt/dict.cpp index 359ce24717..744d388a1f 100644 --- a/src/xbt/dict.cpp +++ b/src/xbt/dict.cpp @@ -29,7 +29,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt, "Dictionaries provide the same fu * Creates and initialize a new dictionary with a default hashtable size. * The dictionary is heterogeneous: each element can have a different free function. */ -xbt_dict_t xbt_dict_new(void) +xbt_dict_t xbt_dict_new() { xbt_dict_t dict = xbt_dict_new_homogeneous(nullptr); dict->homogeneous = 0; @@ -530,15 +530,13 @@ void xbt_dict_dump_sizes(xbt_dict_t dict) * This is an internal XBT function called during the lib initialization. * It can be used several times to recreate the mallocator, for example when you switch to MC mode */ -void xbt_dict_preinit(void) +void xbt_dict_preinit() { if (dict_elm_mallocator == nullptr) - dict_elm_mallocator = xbt_mallocator_new( - 256, dict_elm_mallocator_new_f, dict_elm_mallocator_free_f, + dict_elm_mallocator = xbt_mallocator_new(256, dict_elm_mallocator_new_f, dict_elm_mallocator_free_f, dict_elm_mallocator_reset_f); if (dict_het_elm_mallocator == nullptr) - dict_het_elm_mallocator = xbt_mallocator_new( - 256, dict_het_elm_mallocator_new_f, dict_het_elm_mallocator_free_f, + dict_het_elm_mallocator = xbt_mallocator_new(256, dict_het_elm_mallocator_new_f, dict_het_elm_mallocator_free_f, dict_het_elm_mallocator_reset_f); } @@ -546,7 +544,7 @@ void xbt_dict_preinit(void) * Destroy the dict mallocators. * This is an internal XBT function during the lib initialization */ -void xbt_dict_postexit(void) +void xbt_dict_postexit() { if (dict_elm_mallocator != nullptr) { xbt_mallocator_free(dict_elm_mallocator); diff --git a/src/xbt/dict_private.h b/src/xbt/dict_private.h index 0b4e57fddb..317177f186 100644 --- a/src/xbt/dict_private.h +++ b/src/xbt/dict_private.h @@ -39,12 +39,12 @@ typedef struct s_xbt_dict { typedef struct s_xbt_dict_cursor s_xbt_dict_cursor_t; extern XBT_PRIVATE xbt_mallocator_t dict_elm_mallocator; -XBT_PRIVATE void * dict_elm_mallocator_new_f(void); +XBT_PRIVATE void * dict_elm_mallocator_new_f(); #define dict_elm_mallocator_free_f xbt_free_f #define dict_elm_mallocator_reset_f ((void_f_pvoid_t)NULL) extern XBT_PRIVATE xbt_mallocator_t dict_het_elm_mallocator; -extern XBT_PRIVATE void * dict_het_elm_mallocator_new_f(void); +extern XBT_PRIVATE void * dict_het_elm_mallocator_new_f(); #define dict_het_elm_mallocator_free_f xbt_free_f #define dict_het_elm_mallocator_reset_f ((void_f_pvoid_t)NULL) diff --git a/src/xbt/xbt_replay.cpp b/src/xbt/xbt_replay.cpp index 06f9221d3a..f17014a34a 100644 --- a/src/xbt/xbt_replay.cpp +++ b/src/xbt/xbt_replay.cpp @@ -48,7 +48,7 @@ static char *str_tolower (const char *str) return ret; } -int _xbt_replay_is_active(void){ +int _xbt_replay_is_active(){ return is_replay_active; } @@ -118,7 +118,7 @@ void xbt_replay_action_register(const char *action_name, action_fun function) * * It returns false if it was already done by another process. */ -int _xbt_replay_action_init(void) +int _xbt_replay_action_init() { if (xbt_action_funs) return 0; @@ -128,7 +128,7 @@ int _xbt_replay_action_init(void) return 1; } -void _xbt_replay_action_exit(void) +void _xbt_replay_action_exit() { xbt_dict_free(&xbt_action_queues); xbt_dict_free(&xbt_action_funs); diff --git a/src/xbt_modinter.h b/src/xbt_modinter.h index 988f5f48a5..0936869d0e 100644 --- a/src/xbt_modinter.h +++ b/src/xbt_modinter.h @@ -13,23 +13,23 @@ SG_BEGIN_DECL() /* Modules definitions */ -void xbt_backtrace_preinit(void); -void xbt_backtrace_postexit(void); +void xbt_backtrace_preinit(); +void xbt_backtrace_postexit(); -void xbt_log_preinit(void); +void xbt_log_preinit(); void xbt_log_init(int *argc, char **argv); -void xbt_log_postexit(void); +void xbt_log_postexit(); -void xbt_fifo_preinit(void); -void xbt_fifo_postexit(void); -void xbt_dict_preinit(void); -void xbt_dict_postexit(void); +void xbt_fifo_preinit(); +void xbt_fifo_postexit(); +void xbt_dict_preinit(); +void xbt_dict_postexit(); -void xbt_os_thread_mod_preinit(void); -void xbt_os_thread_mod_postexit(void); +void xbt_os_thread_mod_preinit(); +void xbt_os_thread_mod_postexit(); -void *mmalloc_preinit(void); -void mmalloc_postexit(void); +void *mmalloc_preinit(); +void mmalloc_postexit(); extern int smx_cleaned; extern int xbt_initialized; -- 2.20.1