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);
/* 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) */
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);
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);
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);
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);
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()
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_ */
} 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);
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);
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);
#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);
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);
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);
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);
/************************** 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
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)
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);
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);
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 ************************************/
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();
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,
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);
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);
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);
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 **********************************/
//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
#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);
/* 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; \
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)
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);
/** \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);
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
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, ...);
/* 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
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();
/** @} */
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);
*/
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);
/** @} */
* @{
*/
-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);
/** @} */
/* 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);
#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);
/** 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 */
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()
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);
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);
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);
* @{
*/
/** @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
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 */
* @{
*/
-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;
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);
/** \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);
*
* 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);
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.
*/
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);
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));
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);
#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()
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()
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()
*
* 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).
*
* \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.
*
* \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'
*
* \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'
*
* \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
* 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
*
* \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
*
* 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
*
* 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
*
* 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
/** \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.
*
* 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
* 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
* 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
* 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
*
* 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
*
* 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
*
* \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)
* 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()
*
* \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;
*
* \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);
}
*
* \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);
}
*
* \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);
}
PJ_type_free(type);
}
-void PJ_type_free_all (void)
+void PJ_type_free_all ()
{
recursiveDestroyType (PJ_type_get_root());
rootType = nullptr;
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);
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);
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 */
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);
}}}
/** @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();
};
/* 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();
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<void()> code,
#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()
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);
* 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<double> processes_time;
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;
}
}
/* MSG_task_get related functions */
-void TRACE_msg_task_get_start(void)
+void TRACE_msg_task_get_start()
{
XBT_DEBUG("GET,in");
return 1;
}
-void TRACE_msg_task_put_end(void)
+void TRACE_msg_task_put_end()
{
XBT_DEBUG("PUT,out");
SIMIX_create_environment(file);
}
-void MSG_post_create_environment(void) {
+void MSG_post_create_environment() {
xbt_lib_cursor_t cursor;
void **data;
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;
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);
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);
* 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();
}
}
/** @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();
}
*
* 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());
}
*
* 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());
}
*
* 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();
}
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);
* 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());
}
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);
}
}
-void sg_config_finalize(void)
+void sg_config_finalize()
{
if (!_sg_cfg_init_status)
return; /* Not initialized yet. Nothing to do */
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);
*
* 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);
}
* \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
* \ingroup simix_synchro_management
*
*/
-smx_cond_t simcall_cond_init(void)
+smx_cond_t simcall_cond_init()
{
return simcall_BODY_cond_init();
}
/**
* 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);
/**
* 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;
}
/** @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;
}
* @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;
}
* \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;
}
* 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;
}
* \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
#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();
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();
}
}
-}
\ No newline at end of file
+}
#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 **************************************/
XBT_DEBUG("PARSE TIME: %g", (end - start));
}
-void SIMIX_post_create_environment(void)
+void SIMIX_post_create_environment()
{
surf_presolve();
}
* 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;
#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;
}
*
* 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
*
* \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());
* \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);
}
-void SIMIX_display_process_status(void)
+void SIMIX_display_process_status()
{
if (simix_global->process_list == nullptr) {
return;
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)
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);
}
}
}
-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);
XBT_PUBLIC_DATA(std::unique_ptr<simgrid::simix::Global>) 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 */
#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,
* 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;
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);
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;
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);
}
#endif
-void smpi_bench_destroy(void)
+void smpi_bench_destroy()
{
allocs.clear();
allocs_metadata.clear();
}
}
-void smpi_bench_begin(void)
+void smpi_bench_begin()
{
if (smpi_privatize_global_variables) {
smpi_switch_data_segment(smpi_process_index());
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;
#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);
return static_cast<unsigned long long>(resolution);
}
-unsigned long long smpi_rastro_timestamp (void)
+unsigned long long smpi_rastro_timestamp ()
{
smpi_bench_end();
double now = SIMIX_get_clock();
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)
{
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);
}
}
smpi_datatype_extent(recvtype, &lb, &recvext);
/* Local copy from self */
err =
- smpi_datatype_copy(static_cast<char *>(sendbuf) + senddisps[rank] * sendext,
- sendcounts[rank], sendtype,
- static_cast<char *>(recvbuf) + recvdisps[rank] * recvext,
- recvcounts[rank], recvtype);
+ smpi_datatype_copy(static_cast<char *>(sendbuf) + senddisps[rank] * sendext, sendcounts[rank], sendtype,
+ static_cast<char *>(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));
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 */
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. */
*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();
}
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);
return MPI_SUCCESS;
}
-int PMPI_Finalize(void)
+int PMPI_Finalize()
{
smpi_bench_end();
int rank = smpi_process_index();
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;
}
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);
* 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");
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)
#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)
{
static_cast<simgrid::kernel::routing::AsImpl*>(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);
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();
}
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);
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 */
/* 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;
/* month = {oct}, */
/* year = {2002} */
/* } */
-void surf_network_model_init_CM02(void)
+void surf_network_model_init_CM02()
{
if (surf_network_model)
/* 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;
}
-void surf_network_model_init_Reno2(void)
+void surf_network_model_init_Reno2()
{
if (surf_network_model)
return;
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;
/* month=june, */
/* year={2010} */
/* } */
-void surf_network_model_init_IB(void)
+void surf_network_model_init_IB()
{
using simgrid::surf::networkActionStateChangedCallbacks;
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();
}
/* 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();
* \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;
/**************************************/
/*** 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");
}
/** 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();
* 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);
extern double NOW;
-void surf_presolve(void)
+void surf_presolve()
{
double next_event_date = -1.0;
tmgr_trace_iterator_t event = nullptr;
double NOW = 0;
-double surf_get_clock(void)
+double surf_get_clock()
{
return NOW;
}
* directory on Unix/Linux platforms.
*/
-const char *__surf_get_initial_path(void)
+const char *__surf_get_initial_path()
{
#ifdef _WIN32
MC_memory_init();
}
-void surf_exit(void)
+void surf_exit()
{
unsigned int iter;
simgrid::surf::Model *model = nullptr;
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 */
}
/** \brief Frees all memory allocated by the routing module */
-void routing_exit(void) {
+void routing_exit() {
delete routing_platf;
}
~RoutingPlatf();
AsImpl *root_ = nullptr;
Link *loopback_;
- xbt_dynar_t getOneLinkRoutes(void);
+ xbt_dynar_t getOneLinkRoutes();
void getRouteAndLatency(NetCard *src, NetCard *dst, std::vector<Link*> * links, double *latency);
};
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;
return trace_iterator;
}
-void tmgr_finalize(void)
+void tmgr_finalize()
{
for (auto kv : trace_list) {
xbt_free((char*)kv.first);
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;
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);
XBT_PUBLIC_DATA(int_f_void_t) surf_parse; /* Entry-point to the parser. Set this to your function. */
-
SG_END_DECL()
namespace simgrid {
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
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);
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 {
Link* linkDown;
} s_surf_parsing_link_up_down_t;
-
SG_END_DECL()
namespace simgrid {
}
-/** @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];
);
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<char, void(*)(void*)>(xbt_strdup(name), std::free);
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()
{
}
// ***** 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)
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 ]---------------------------------------------------------*/
return _xbt_test_unit_failed;
}
-void xbt_test_exit(void)
+void xbt_test_exit()
{
xbt_dynar_free(&_xbt_test_suites);
}
_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);
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);
* 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;
* 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);
}
* 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);
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)
return ret;
}
-int _xbt_replay_is_active(void){
+int _xbt_replay_is_active(){
return is_replay_active;
}
*
* 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;
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);
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;