From f787351e3355ab558d4f491bc52bef2012eaa3e8 Mon Sep 17 00:00:00 2001 From: cherierm Date: Fri, 6 Oct 2006 15:52:06 +0000 Subject: [PATCH] Only adds the XBT_PUBLIC macro decoration a the begining of the public API functions. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2875 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/msg/msg.h | 146 +++++++++++------------ include/simdag/simdag.h | 92 +++++++------- src/amok/Bandwidth/bandwidth_private.h | 14 +-- src/amok/amok_modinter.h | 6 +- src/gras/DataDesc/datadesc_interface.h | 22 ++-- src/gras/DataDesc/datadesc_private.h | 16 +-- src/gras/DataDesc/ddt_parse.yy.h | 36 +++--- src/gras/Msg/msg_interface.h | 2 +- src/gras/Msg/msg_private.h | 12 +- src/gras/Transport/transport_interface.h | 14 +-- src/gras/Transport/transport_private.h | 12 +- src/gras/Virtu/virtu_interface.h | 6 +- src/gras/Virtu/virtu_private.h | 4 +- src/gras/Virtu/virtu_sg.h | 2 +- src/msg/private.h | 28 ++--- src/simdag/private.h | 18 +-- src/xbt/context_win32.h | 8 +- 17 files changed, 219 insertions(+), 219 deletions(-) diff --git a/include/msg/msg.h b/include/msg/msg.h index 0952400162..b5c21a7686 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -15,107 +15,107 @@ SG_BEGIN_DECL() /************************** Global ******************************************/ -void MSG_config(const char *name, ...); -void MSG_global_init(int *argc, char **argv); -void MSG_global_init_args(int *argc, char **argv); -MSG_error_t MSG_set_channel_number(int number); -int MSG_get_channel_number(void); -MSG_error_t MSG_main(void); -MSG_error_t MSG_clean(void); -void MSG_function_register(const char *name, m_process_code_t code); -m_process_code_t MSG_get_registered_function(const char *name); -void MSG_launch_application(const char *file); -void MSG_paje_output(const char *filename); - -double MSG_get_clock(void); +XBT_PUBLIC void MSG_config(const char *name, ...); +XBT_PUBLIC void MSG_global_init(int *argc, char **argv); +XBT_PUBLIC void MSG_global_init_args(int *argc, char **argv); +XBT_PUBLIC MSG_error_t MSG_set_channel_number(int number); +XBT_PUBLIC int MSG_get_channel_number(void); +XBT_PUBLIC MSG_error_t MSG_main(void); +XBT_PUBLIC MSG_error_t MSG_clean(void); +XBT_PUBLIC void MSG_function_register(const char *name, m_process_code_t code); +XBT_PUBLIC m_process_code_t MSG_get_registered_function(const char *name); +XBT_PUBLIC void MSG_launch_application(const char *file); +XBT_PUBLIC void MSG_paje_output(const char *filename); + +XBT_PUBLIC double MSG_get_clock(void); /************************** Host handling ***********************************/ -MSG_error_t MSG_host_set_data(m_host_t host, void *data); -void *MSG_host_get_data(m_host_t host); -const char *MSG_host_get_name(m_host_t host); -m_host_t MSG_host_self(void); -int MSG_get_host_msgload(m_host_t host); +XBT_PUBLIC MSG_error_t MSG_host_set_data(m_host_t host, void *data); +XBT_PUBLIC void *MSG_host_get_data(m_host_t host); +XBT_PUBLIC const char *MSG_host_get_name(m_host_t host); +XBT_PUBLIC m_host_t MSG_host_self(void); +XBT_PUBLIC int MSG_get_host_msgload(m_host_t host); /* int MSG_get_msgload(void); This function lacks specification; discard it */ -double MSG_get_host_speed(m_host_t h); -int MSG_host_is_avail (m_host_t h); +XBT_PUBLIC double MSG_get_host_speed(m_host_t h); +XBT_PUBLIC int MSG_host_is_avail (m_host_t h); -void MSG_create_environment(const char *file); +XBT_PUBLIC void MSG_create_environment(const char *file); -m_host_t MSG_get_host_by_name(const char *name); -int MSG_get_host_number(void); -m_host_t *MSG_get_host_table(void); +XBT_PUBLIC m_host_t MSG_get_host_by_name(const char *name); +XBT_PUBLIC int MSG_get_host_number(void); +XBT_PUBLIC m_host_t *MSG_get_host_table(void); /************************** Process handling *********************************/ -m_process_t MSG_process_create(const char *name, +XBT_PUBLIC m_process_t MSG_process_create(const char *name, m_process_code_t code, void *data, m_host_t host); -m_process_t MSG_process_create_with_arguments(const char *name, +XBT_PUBLIC m_process_t MSG_process_create_with_arguments(const char *name, m_process_code_t code, void *data, m_host_t host, int argc, char **argv); -void MSG_process_kill(m_process_t process); -int MSG_process_killall(int reset_PIDs); - -MSG_error_t MSG_process_change_host(m_process_t process, m_host_t host); - -void *MSG_process_get_data(m_process_t process); -MSG_error_t MSG_process_set_data(m_process_t process, void *data); -m_host_t MSG_process_get_host(m_process_t process); -m_process_t MSG_process_from_PID(int PID); -int MSG_process_get_PID(m_process_t process); -int MSG_process_get_PPID(m_process_t process); -const char *MSG_process_get_name(m_process_t process); -int MSG_process_self_PID(void); -int MSG_process_self_PPID(void); -m_process_t MSG_process_self(void); - -MSG_error_t MSG_process_suspend(m_process_t process); -MSG_error_t MSG_process_resume(m_process_t process); -int MSG_process_is_suspended(m_process_t process); +XBT_PUBLIC void MSG_process_kill(m_process_t process); +XBT_PUBLIC int MSG_process_killall(int reset_PIDs); + +XBT_PUBLIC MSG_error_t MSG_process_change_host(m_process_t process, m_host_t host); + +XBT_PUBLIC void *MSG_process_get_data(m_process_t process); +XBT_PUBLIC MSG_error_t MSG_process_set_data(m_process_t process, void *data); +XBT_PUBLIC m_host_t MSG_process_get_host(m_process_t process); +XBT_PUBLIC m_process_t MSG_process_from_PID(int PID); +XBT_PUBLIC int MSG_process_get_PID(m_process_t process); +XBT_PUBLIC int MSG_process_get_PPID(m_process_t process); +XBT_PUBLIC const char *MSG_process_get_name(m_process_t process); +XBT_PUBLIC int MSG_process_self_PID(void); +XBT_PUBLIC int MSG_process_self_PPID(void); +XBT_PUBLIC m_process_t MSG_process_self(void); + +XBT_PUBLIC MSG_error_t MSG_process_suspend(m_process_t process); +XBT_PUBLIC MSG_error_t MSG_process_resume(m_process_t process); +XBT_PUBLIC int MSG_process_is_suspended(m_process_t process); /************************** Task handling ************************************/ -m_task_t MSG_task_create(const char *name, double compute_duration, +XBT_PUBLIC m_task_t MSG_task_create(const char *name, double compute_duration, double message_size, void *data); -m_task_t MSG_parallel_task_create(const char *name, +XBT_PUBLIC m_task_t MSG_parallel_task_create(const char *name, int host_nb, const m_host_t *host_list, double *computation_amount, double *communication_amount, void *data); -void *MSG_task_get_data(m_task_t task); -m_process_t MSG_task_get_sender(m_task_t task); -m_host_t MSG_task_get_source(m_task_t task); -const char *MSG_task_get_name(m_task_t task); -MSG_error_t MSG_task_cancel(m_task_t task); -MSG_error_t MSG_task_destroy(m_task_t task); - -MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel); -MSG_error_t MSG_task_get_with_time_out(m_task_t * task, m_channel_t channel, +XBT_PUBLIC void *MSG_task_get_data(m_task_t task); +XBT_PUBLIC m_process_t MSG_task_get_sender(m_task_t task); +XBT_PUBLIC m_host_t MSG_task_get_source(m_task_t task); +XBT_PUBLIC const char *MSG_task_get_name(m_task_t task); +XBT_PUBLIC MSG_error_t MSG_task_cancel(m_task_t task); +XBT_PUBLIC MSG_error_t MSG_task_destroy(m_task_t task); + +XBT_PUBLIC MSG_error_t MSG_task_get(m_task_t * task, m_channel_t channel); +XBT_PUBLIC MSG_error_t MSG_task_get_with_time_out(m_task_t * task, m_channel_t channel, double max_duration); -MSG_error_t MSG_task_get_from_host(m_task_t * task, int channel, +XBT_PUBLIC MSG_error_t MSG_task_get_from_host(m_task_t * task, int channel, m_host_t host); -MSG_error_t MSG_task_put(m_task_t task, m_host_t dest, +XBT_PUBLIC MSG_error_t MSG_task_put(m_task_t task, m_host_t dest, m_channel_t channel); -MSG_error_t MSG_task_put_bounded(m_task_t task, +XBT_PUBLIC MSG_error_t MSG_task_put_bounded(m_task_t task, m_host_t dest, m_channel_t channel, double max_rate); -MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest, +XBT_PUBLIC MSG_error_t MSG_task_put_with_timeout(m_task_t task, m_host_t dest, m_channel_t channel, double max_duration); -MSG_error_t MSG_task_execute(m_task_t task); -MSG_error_t MSG_parallel_task_execute(m_task_t task); -void MSG_task_set_priority(m_task_t task, double priority); - -int MSG_task_Iprobe(m_channel_t channel); -int MSG_task_probe_from(m_channel_t channel); -int MSG_task_probe_from_host(int channel, m_host_t host); -MSG_error_t MSG_channel_select_from(m_channel_t channel, double max_duration, +XBT_PUBLIC MSG_error_t MSG_task_execute(m_task_t task); +XBT_PUBLIC MSG_error_t MSG_parallel_task_execute(m_task_t task); +XBT_PUBLIC void MSG_task_set_priority(m_task_t task, double priority); + +XBT_PUBLIC int MSG_task_Iprobe(m_channel_t channel); +XBT_PUBLIC int MSG_task_probe_from(m_channel_t channel); +XBT_PUBLIC int MSG_task_probe_from_host(int channel, m_host_t host); +XBT_PUBLIC MSG_error_t MSG_channel_select_from(m_channel_t channel, double max_duration, int *PID); -MSG_error_t MSG_process_sleep(double nb_sec); -MSG_error_t MSG_get_errno(void); +XBT_PUBLIC MSG_error_t MSG_process_sleep(double nb_sec); +XBT_PUBLIC MSG_error_t MSG_get_errno(void); -double MSG_task_get_compute_duration(m_task_t task); -double MSG_task_get_remaining_computation(m_task_t task); -double MSG_task_get_data_size(m_task_t task); +XBT_PUBLIC double MSG_task_get_compute_duration(m_task_t task); +XBT_PUBLIC double MSG_task_get_remaining_computation(m_task_t task); +XBT_PUBLIC double MSG_task_get_data_size(m_task_t task); SG_END_DECL() #endif diff --git a/include/simdag/simdag.h b/include/simdag/simdag.h index 4eefb48953..c250e0fefc 100644 --- a/include/simdag/simdag.h +++ b/include/simdag/simdag.h @@ -20,13 +20,13 @@ SG_BEGIN_DECL() * @see SD_link_t * @{ */ -const SD_link_t* SD_link_get_list(void); -int SD_link_get_number(void); -void* SD_link_get_data(SD_link_t link); -void SD_link_set_data(SD_link_t link, void *data); -const char* SD_link_get_name(SD_link_t link); -double SD_link_get_current_bandwidth(SD_link_t link); -double SD_link_get_current_latency(SD_link_t link); +XBT_PUBLIC const SD_link_t* SD_link_get_list(void); +XBT_PUBLIC int SD_link_get_number(void); +XBT_PUBLIC void* SD_link_get_data(SD_link_t link); +XBT_PUBLIC void SD_link_set_data(SD_link_t link, void *data); +XBT_PUBLIC const char* SD_link_get_name(SD_link_t link); +XBT_PUBLIC double SD_link_get_current_bandwidth(SD_link_t link); +XBT_PUBLIC double SD_link_get_current_latency(SD_link_t link); /** @} */ /************************** Workstation handling ****************************/ @@ -45,24 +45,24 @@ double SD_link_get_current_latency(SD_link_t link); * @see SD_workstation_t * @{ */ -SD_workstation_t SD_workstation_get_by_name(const char *name); -const SD_workstation_t* SD_workstation_get_list(void); -int SD_workstation_get_number(void); -void SD_workstation_set_data(SD_workstation_t workstation, void *data); -void* SD_workstation_get_data(SD_workstation_t workstation); -const char* SD_workstation_get_name(SD_workstation_t workstation); -const SD_link_t* SD_route_get_list(SD_workstation_t src, SD_workstation_t dst); -int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst); -double SD_workstation_get_power(SD_workstation_t workstation); -double SD_workstation_get_available_power(SD_workstation_t workstation); -e_SD_workstation_access_mode_t SD_workstation_get_access_mode(SD_workstation_t workstation); -void SD_workstation_set_access_mode(SD_workstation_t workstation, +XBT_PUBLIC SD_workstation_t SD_workstation_get_by_name(const char *name); +XBT_PUBLIC const SD_workstation_t* SD_workstation_get_list(void); +XBT_PUBLIC int SD_workstation_get_number(void); +XBT_PUBLIC void SD_workstation_set_data(SD_workstation_t workstation, void *data); +XBT_PUBLIC void* SD_workstation_get_data(SD_workstation_t workstation); +XBT_PUBLIC const char* SD_workstation_get_name(SD_workstation_t workstation); +XBT_PUBLIC const SD_link_t* SD_route_get_list(SD_workstation_t src, SD_workstation_t dst); +XBT_PUBLIC int SD_route_get_size(SD_workstation_t src, SD_workstation_t dst); +XBT_PUBLIC double SD_workstation_get_power(SD_workstation_t workstation); +XBT_PUBLIC double SD_workstation_get_available_power(SD_workstation_t workstation); +XBT_PUBLIC e_SD_workstation_access_mode_t SD_workstation_get_access_mode(SD_workstation_t workstation); +XBT_PUBLIC void SD_workstation_set_access_mode(SD_workstation_t workstation, e_SD_workstation_access_mode_t access_mode); -double SD_workstation_get_computation_time(SD_workstation_t workstation, double computation_amount); -double SD_route_get_current_latency(SD_workstation_t src, SD_workstation_t dst); -double SD_route_get_current_bandwidth(SD_workstation_t src, SD_workstation_t dst); -double SD_route_get_communication_time(SD_workstation_t src, SD_workstation_t dst, +XBT_PUBLIC double SD_workstation_get_computation_time(SD_workstation_t workstation, double computation_amount); +XBT_PUBLIC double SD_route_get_current_latency(SD_workstation_t src, SD_workstation_t dst); +XBT_PUBLIC double SD_route_get_current_bandwidth(SD_workstation_t src, SD_workstation_t dst); +XBT_PUBLIC double SD_route_get_communication_time(SD_workstation_t src, SD_workstation_t dst, double communication_amount); /** @} */ @@ -83,26 +83,26 @@ double SD_route_get_communication_time(SD_workstation_t src, SD_workstation_t * @see SD_task_t, SD_task_dependency_management * @{ */ -SD_task_t SD_task_create(const char *name, void *data, double amount); -void* SD_task_get_data(SD_task_t task); -void SD_task_set_data(SD_task_t task, void *data); -e_SD_task_state_t SD_task_get_state(SD_task_t task); -const char* SD_task_get_name(SD_task_t task); -void SD_task_watch(SD_task_t task, e_SD_task_state_t state); -void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state); -double SD_task_get_amount(SD_task_t task); -double SD_task_get_remaining_amount(SD_task_t task); -double SD_task_get_execution_time(SD_task_t task, int workstation_nb, +XBT_PUBLIC SD_task_t SD_task_create(const char *name, void *data, double amount); +XBT_PUBLIC void* SD_task_get_data(SD_task_t task); +XBT_PUBLIC void SD_task_set_data(SD_task_t task, void *data); +XBT_PUBLIC e_SD_task_state_t SD_task_get_state(SD_task_t task); +XBT_PUBLIC const char* SD_task_get_name(SD_task_t task); +XBT_PUBLIC void SD_task_watch(SD_task_t task, e_SD_task_state_t state); +XBT_PUBLIC void SD_task_unwatch(SD_task_t task, e_SD_task_state_t state); +XBT_PUBLIC double SD_task_get_amount(SD_task_t task); +XBT_PUBLIC double SD_task_get_remaining_amount(SD_task_t task); +XBT_PUBLIC double SD_task_get_execution_time(SD_task_t task, int workstation_nb, const SD_workstation_t *workstation_list, const double *computation_amount, const double *communication_amount, double rate); -void SD_task_schedule(SD_task_t task, int workstation_nb, +XBT_PUBLIC void SD_task_schedule(SD_task_t task, int workstation_nb, const SD_workstation_t *workstation_list, const double *computation_amount, const double *communication_amount, double rate); -void SD_task_unschedule(SD_task_t task); -double SD_task_get_start_time(SD_task_t task); -double SD_task_get_finish_time(SD_task_t task); -void SD_task_destroy(SD_task_t task); +XBT_PUBLIC void SD_task_unschedule(SD_task_t task); +XBT_PUBLIC double SD_task_get_start_time(SD_task_t task); +XBT_PUBLIC double SD_task_get_finish_time(SD_task_t task); +XBT_PUBLIC void SD_task_destroy(SD_task_t task); /** @} */ @@ -114,9 +114,9 @@ void SD_task_destroy(SD_task_t task); * @see SD_task_management * @{ */ -void SD_task_dependency_add(const char *name, void *data, SD_task_t src, SD_task_t dst); -void SD_task_dependency_remove(SD_task_t src, SD_task_t dst); -void* SD_task_dependency_get_data(SD_task_t src, SD_task_t dst); +XBT_PUBLIC void SD_task_dependency_add(const char *name, void *data, SD_task_t src, SD_task_t dst); +XBT_PUBLIC void SD_task_dependency_remove(SD_task_t src, SD_task_t dst); +XBT_PUBLIC void* SD_task_dependency_get_data(SD_task_t src, SD_task_t dst); /** @} */ /************************** Global *******************************************/ @@ -129,11 +129,11 @@ void* SD_task_dependency_get_data(SD_task_t src, SD_task_t dst); * * @{ */ -void SD_init(int *argc, char **argv); -void SD_create_environment(const char *platform_file); -SD_task_t* SD_simulate(double how_long); -double SD_get_clock(void); -void SD_exit(void); +XBT_PUBLIC void SD_init(int *argc, char **argv); +XBT_PUBLIC void SD_create_environment(const char *platform_file); +XBT_PUBLIC SD_task_t* SD_simulate(double how_long); +XBT_PUBLIC double SD_get_clock(void); +XBT_PUBLIC void SD_exit(void); /** @} */ SG_END_DECL() diff --git a/src/amok/Bandwidth/bandwidth_private.h b/src/amok/Bandwidth/bandwidth_private.h index 39d71c2be4..74cf57c0da 100644 --- a/src/amok/Bandwidth/bandwidth_private.h +++ b/src/amok/Bandwidth/bandwidth_private.h @@ -16,13 +16,13 @@ #include "gras.h" #include "amok/bandwidth.h" -void amok_bw_bw_init(void); /* Must be called only once per node */ -void amok_bw_bw_join(void); /* Each process must run it */ -void amok_bw_bw_leave(void);/* Each process must run it */ +XBT_PUBLIC void amok_bw_bw_init(void); /* Must be called only once per node */ +XBT_PUBLIC void amok_bw_bw_join(void); /* Each process must run it */ +XBT_PUBLIC void amok_bw_bw_leave(void);/* Each process must run it */ -void amok_bw_sat_init(void); /* Must be called only once per node */ -void amok_bw_sat_join(void); /* Each process must run it */ -void amok_bw_sat_leave(void);/* Each process must run it */ +XBT_PUBLIC void amok_bw_sat_init(void); /* Must be called only once per node */ +XBT_PUBLIC void amok_bw_sat_join(void); /* Each process must run it */ +XBT_PUBLIC void amok_bw_sat_leave(void);/* Each process must run it */ /*** * Plain bandwidth measurement stuff @@ -60,7 +60,7 @@ typedef struct { unsigned int duration; } s_sat_request_t,*sat_request_t; -void amok_bw_sat_start(const char* from_name,unsigned int from_port, +XBT_PUBLIC void amok_bw_sat_start(const char* from_name,unsigned int from_port, const char* to_name,unsigned int to_port, unsigned int msg_size, unsigned int duration); diff --git a/src/amok/amok_modinter.h b/src/amok/amok_modinter.h index 7267c78e40..bc59e1af19 100644 --- a/src/amok/amok_modinter.h +++ b/src/amok/amok_modinter.h @@ -10,10 +10,10 @@ #ifndef AMOK_BASE_H #define AMOK_BASE_H -void amok_init(void); -void amok_exit(void); +XBT_PUBLIC void amok_init(void); +XBT_PUBLIC void amok_exit(void); /* module creation functions */ -void amok_pm_modulecreate(void); +XBT_PUBLIC void amok_pm_modulecreate(void); #endif /* AMOK_BASE_H */ diff --git a/src/gras/DataDesc/datadesc_interface.h b/src/gras/DataDesc/datadesc_interface.h index 36af602d5c..242cbf7e07 100644 --- a/src/gras/DataDesc/datadesc_interface.h +++ b/src/gras/DataDesc/datadesc_interface.h @@ -14,29 +14,29 @@ #ifndef GRAS_DATADESC_INTERFACE_H #define GRAS_DATADESC_INTERFACE_H -gras_datadesc_type_t gras_datadesc_by_id (long int code); +XBT_PUBLIC gras_datadesc_type_t gras_datadesc_by_id (long int code); /* to debug */ -void gras_datadesc_type_dump(const gras_datadesc_type_t ddt); -const char *gras_datadesc_arch_name(int code); +XBT_PUBLIC void gras_datadesc_type_dump(const gras_datadesc_type_t ddt); +XBT_PUBLIC const char *gras_datadesc_arch_name(int code); /* compare two data type description */ -int +XBT_PUBLIC int gras_datadesc_type_cmp(const gras_datadesc_type_t d1, const gras_datadesc_type_t d2); /* Access function */ -int gras_datadesc_size(gras_datadesc_type_t type); +XBT_PUBLIC int gras_datadesc_size(gras_datadesc_type_t type); /* Described data exchanges: direct use */ -int gras_datadesc_copy(gras_datadesc_type_t type, void *src, void *dst); -void gras_datadesc_send(gras_socket_t sock, gras_datadesc_type_t type, void *src); -void gras_datadesc_recv(gras_socket_t sock, gras_datadesc_type_t type, +XBT_PUBLIC int gras_datadesc_copy(gras_datadesc_type_t type, void *src, void *dst); +XBT_PUBLIC void gras_datadesc_send(gras_socket_t sock, gras_datadesc_type_t type, void *src); +XBT_PUBLIC void gras_datadesc_recv(gras_socket_t sock, gras_datadesc_type_t type, int r_arch, void *dst); /* Described data exchanges: IDL compilation FIXME: not implemented*/ -void gras_datadesc_gen_cpy(gras_datadesc_type_t type, void *src, void **dst); -void gras_datadesc_gen_send(gras_socket_t sock, gras_datadesc_type_t type, void *src); -void gras_datadesc_gen_recv(gras_socket_t sock, gras_datadesc_type_t type, +XBT_PUBLIC void gras_datadesc_gen_cpy(gras_datadesc_type_t type, void *src, void **dst); +XBT_PUBLIC void gras_datadesc_gen_send(gras_socket_t sock, gras_datadesc_type_t type, void *src); +XBT_PUBLIC void gras_datadesc_gen_recv(gras_socket_t sock, gras_datadesc_type_t type, int r_arch, void *dst); diff --git a/src/gras/DataDesc/datadesc_private.h b/src/gras/DataDesc/datadesc_private.h index 72557482c7..b67772855b 100644 --- a/src/gras/DataDesc/datadesc_private.h +++ b/src/gras/DataDesc/datadesc_private.h @@ -37,7 +37,7 @@ #define ddt_aligned(v, a) (((v) + (a - 1)) & ~(a - 1)) /*@null@*/extern xbt_set_t gras_datadesc_set_local; -void gras_ddt_freev(void *ddt); +XBT_PUBLIC void gras_ddt_freev(void *ddt); /******************************************* * Descriptions of all known architectures * *******************************************/ @@ -114,7 +114,7 @@ typedef struct s_gras_dd_cat_field { } s_gras_dd_cat_field_t,*gras_dd_cat_field_t; -void gras_dd_cat_field_free(void *f); +XBT_PUBLIC void gras_dd_cat_field_free(void *f); /** * gras_dd_cat_scalar_t: @@ -236,9 +236,9 @@ typedef struct s_gras_datadesc_type { /*************************** * constructor/desctructor * ***************************/ -void gras_datadesc_free(gras_datadesc_type_t *type); +XBT_PUBLIC void gras_datadesc_free(gras_datadesc_type_t *type); -gras_datadesc_type_t +XBT_PUBLIC gras_datadesc_type_t gras_datadesc_scalar(const char *name, gras_ddt_scalar_type_t type, enum e_gras_dd_scalar_encoding encoding); @@ -246,14 +246,14 @@ gras_datadesc_type_t /**************************************************** * Callback persistant state constructor/destructor * ****************************************************/ -gras_cbps_t gras_cbps_new(void); -void gras_cbps_free(gras_cbps_t *state); -void gras_cbps_reset(gras_cbps_t state); +XBT_PUBLIC gras_cbps_t gras_cbps_new(void); +XBT_PUBLIC void gras_cbps_free(gras_cbps_t *state); +XBT_PUBLIC void gras_cbps_reset(gras_cbps_t state); /*************** * Convertions * ***************/ -void +XBT_PUBLIC void gras_dd_convert_elm(gras_datadesc_type_t type, int count, int r_arch, void *src, void *dst); diff --git a/src/gras/DataDesc/ddt_parse.yy.h b/src/gras/DataDesc/ddt_parse.yy.h index cfedb4f644..deb91d0ce0 100644 --- a/src/gras/DataDesc/ddt_parse.yy.h +++ b/src/gras/DataDesc/ddt_parse.yy.h @@ -36,26 +36,26 @@ extern int gras_ddt_parse_col_pos; extern int gras_ddt_parse_char_pos; extern int gras_ddt_parse_tok_num; -void gras_ddt_parse_dump(void); -int gras_ddt_parse_lex_n_dump(void); -void gras_ddt_parse_pointer_init(const char *file); -void gras_ddt_parse_pointer_close(void); -void gras_ddt_parse_pointer_string_init(const char *string_to_parse); -void gras_ddt_parse_pointer_string_close(void); +XBT_PUBLIC void gras_ddt_parse_dump(void); +XBT_PUBLIC int gras_ddt_parse_lex_n_dump(void); +XBT_PUBLIC void gras_ddt_parse_pointer_init(const char *file); +XBT_PUBLIC void gras_ddt_parse_pointer_close(void); +XBT_PUBLIC void gras_ddt_parse_pointer_string_init(const char *string_to_parse); +XBT_PUBLIC void gras_ddt_parse_pointer_string_close(void); /* prototypes of the functions offered by flex */ -int gras_ddt_parse_lex(void); -int gras_ddt_parse_get_lineno (void); -FILE *gras_ddt_parse_get_in (void); -FILE *gras_ddt_parse_get_out (void); -int gras_ddt_parse_get_leng (void); -char *gras_ddt_parse_get_text (void); -void gras_ddt_parse_set_lineno (int line_number ); -void gras_ddt_parse_set_in (FILE * in_str ); -void gras_ddt_parse_set_out (FILE * out_str ); -int gras_ddt_parse_get_debug (void); -void gras_ddt_parse_set_debug (int bdebug ); -int gras_ddt_parse_lex_destroy (void); +XBT_PUBLIC int gras_ddt_parse_lex(void); +XBT_PUBLIC int gras_ddt_parse_get_lineno (void); +XBT_PUBLIC FILE *gras_ddt_parse_get_in (void); +XBT_PUBLIC FILE *gras_ddt_parse_get_out (void); +XBT_PUBLIC int gras_ddt_parse_get_leng (void); +XBT_PUBLIC char *gras_ddt_parse_get_text (void); +XBT_PUBLIC void gras_ddt_parse_set_lineno (int line_number ); +XBT_PUBLIC void gras_ddt_parse_set_in (FILE * in_str ); +XBT_PUBLIC void gras_ddt_parse_set_out (FILE * out_str ); +XBT_PUBLIC int gras_ddt_parse_get_debug (void); +XBT_PUBLIC void gras_ddt_parse_set_debug (int bdebug ); +XBT_PUBLIC int gras_ddt_parse_lex_destroy (void); #define PARSE_ERROR_PRE do { #define PARSE_ERROR_POST xbt_abort();} while (0) diff --git a/src/gras/Msg/msg_interface.h b/src/gras/Msg/msg_interface.h index a6b84c9108..f7605c6f49 100644 --- a/src/gras/Msg/msg_interface.h +++ b/src/gras/Msg/msg_interface.h @@ -37,7 +37,7 @@ typedef struct { } s_gras_msg_procdata_t,*gras_msg_procdata_t; -void gras_msg_send_namev(gras_socket_t sock, +XBT_PUBLIC void gras_msg_send_namev(gras_socket_t sock, const char *namev, void *payload); diff --git a/src/gras/Msg/msg_private.h b/src/gras/Msg/msg_private.h index 1cba35e252..4c81cf110f 100644 --- a/src/gras/Msg/msg_private.h +++ b/src/gras/Msg/msg_private.h @@ -35,7 +35,7 @@ extern int gras_msg_libdata_id; /* The identifier of our libdata */ extern const char *e_gras_msg_kind_names[e_gras_msg_kind_count]; /* declare either regular messages or RPC or whatever */ -void +XBT_PUBLIC void gras_msgtype_declare_ext(const char *name, short int version, e_gras_msg_kind_t kind, @@ -65,9 +65,9 @@ void gras_msgtype_free(void *msgtype); /* functions to extract msg from socket or put it on wire (depend RL vs SG) */ -void gras_msg_recv(gras_socket_t sock, +XBT_PUBLIC void gras_msg_recv(gras_socket_t sock, gras_msg_t msg/*OUT*/); -void gras_msg_send_ext(gras_socket_t sock, +XBT_PUBLIC void gras_msg_send_ext(gras_socket_t sock, e_gras_msg_kind_t kind, unsigned long int ID, gras_msgtype_t msgtype, @@ -84,8 +84,8 @@ struct s_gras_cblist { }; typedef struct s_gras_cblist gras_cblist_t; -void gras_cbl_free(void *); /* used to free the memory at the end */ -void gras_cblist_free(void *cbl); +XBT_PUBLIC void gras_cbl_free(void *); /* used to free the memory at the end */ +XBT_PUBLIC void gras_cblist_free(void *cbl); /** * gras_msg_cb_ctx_t: @@ -111,7 +111,7 @@ typedef struct { } s_gras_timer_t, *gras_timer_t; /* returns 0 if it handled a timer, or the delay until next timer, or -1 if no armed timer */ -double gras_msg_timer_handle(void); +XBT_PUBLIC double gras_msg_timer_handle(void); diff --git a/src/gras/Transport/transport_interface.h b/src/gras/Transport/transport_interface.h index b606cf7a1a..fc60058f96 100644 --- a/src/gras/Transport/transport_interface.h +++ b/src/gras/Transport/transport_interface.h @@ -23,15 +23,15 @@ extern int gras_opt_trp_nomoredata_on_close; *** Main user functions ***/ /* stable if we know the storage will keep as is until the next trp_flush */ -void gras_trp_send(gras_socket_t sd, char *data, long int size, int stable); -void gras_trp_recv(gras_socket_t sd, char *data, long int size); -void gras_trp_flush(gras_socket_t sd); +XBT_PUBLIC void gras_trp_send(gras_socket_t sd, char *data, long int size, int stable); +XBT_PUBLIC void gras_trp_recv(gras_socket_t sd, char *data, long int size); +XBT_PUBLIC void gras_trp_flush(gras_socket_t sd); /* Find which socket needs to be read next */ -gras_socket_t gras_trp_select(double timeout); +XBT_PUBLIC gras_socket_t gras_trp_select(double timeout); /* Set the peer process name (used by messaging layer) */ -void gras_socket_peer_proc_set(gras_socket_t sock,char*peer_proc); +XBT_PUBLIC void gras_socket_peer_proc_set(gras_socket_t sock,char*peer_proc); /*** *** Plugin mechanism @@ -85,7 +85,7 @@ struct gras_trp_plugin_ { void (*exit)(gras_trp_plugin_t); }; -gras_trp_plugin_t +XBT_PUBLIC gras_trp_plugin_t gras_trp_plugin_get_by_name(const char *name); /* Data of this module specific to each process @@ -108,6 +108,6 @@ typedef struct { } s_gras_trp_procdata_t,*gras_trp_procdata_t; /* Display the content of our socket set (debugging purpose) */ -void gras_trp_socketset_dump(const char *name); +XBT_PUBLIC void gras_trp_socketset_dump(const char *name); #endif /* GRAS_TRP_INTERFACE_H */ diff --git a/src/gras/Transport/transport_private.h b/src/gras/Transport/transport_private.h index becb2627aa..9cc653d3af 100644 --- a/src/gras/Transport/transport_private.h +++ b/src/gras/Transport/transport_private.h @@ -75,16 +75,16 @@ typedef struct s_gras_socket { gras_trp_bufdata_t *bufdata; }s_gras_socket_t; -void gras_trp_socket_new(int incomming, +XBT_PUBLIC void gras_trp_socket_new(int incomming, gras_socket_t *dst); /* The drivers */ typedef void (*gras_trp_setup_t)(gras_trp_plugin_t dst); -void gras_trp_tcp_setup(gras_trp_plugin_t plug); -void gras_trp_iov_setup(gras_trp_plugin_t plug); -void gras_trp_file_setup(gras_trp_plugin_t plug); -void gras_trp_sg_setup(gras_trp_plugin_t plug); +XBT_PUBLIC void gras_trp_tcp_setup(gras_trp_plugin_t plug); +XBT_PUBLIC void gras_trp_iov_setup(gras_trp_plugin_t plug); +XBT_PUBLIC void gras_trp_file_setup(gras_trp_plugin_t plug); +XBT_PUBLIC void gras_trp_sg_setup(gras_trp_plugin_t plug); /* @@ -104,6 +104,6 @@ void gras_trp_sg_setup(gras_trp_plugin_t plug); */ -gras_socket_t gras_trp_buf_init_sock(gras_socket_t sock); +XBT_PUBLIC gras_socket_t gras_trp_buf_init_sock(gras_socket_t sock); #endif /* GRAS_TRP_PRIVATE_H */ diff --git a/src/gras/Virtu/virtu_interface.h b/src/gras/Virtu/virtu_interface.h index ebd922d9f6..8aa2e75431 100644 --- a/src/gras/Virtu/virtu_interface.h +++ b/src/gras/Virtu/virtu_interface.h @@ -22,8 +22,8 @@ /* declare a new process specific data (used by gras__register to make sure that gras_process_init will create it) */ -int gras_procdata_add(const char *name, pvoid_f_void_t creator,void_f_pvoid_t destructor); -void *gras_libdata_by_name(const char *name); -void *gras_libdata_by_id(int id); +XBT_PUBLIC int gras_procdata_add(const char *name, pvoid_f_void_t creator,void_f_pvoid_t destructor); +XBT_PUBLIC void *gras_libdata_by_name(const char *name); +XBT_PUBLIC void *gras_libdata_by_id(int id); #endif /* GRAS_VIRTU_INTERFACE_H */ diff --git a/src/gras/Virtu/virtu_private.h b/src/gras/Virtu/virtu_private.h index ac60812959..26079af776 100644 --- a/src/gras/Virtu/virtu_private.h +++ b/src/gras/Virtu/virtu_private.h @@ -34,8 +34,8 @@ typedef struct { xbt_dynar_t moddata; } gras_procdata_t; -gras_procdata_t *gras_procdata_get(void); -void *gras_libdata_by_name_from_procdata(const char *name, gras_procdata_t* pd); +XBT_PUBLIC gras_procdata_t *gras_procdata_get(void); +XBT_PUBLIC void *gras_libdata_by_name_from_procdata(const char *name, gras_procdata_t* pd); #endif /* GRAS_VIRTU_PRIVATE_H */ diff --git a/src/gras/Virtu/virtu_sg.h b/src/gras/Virtu/virtu_sg.h index 25f0854fce..bdf6570518 100644 --- a/src/gras/Virtu/virtu_sg.h +++ b/src/gras/Virtu/virtu_sg.h @@ -40,7 +40,7 @@ typedef struct { } gras_trp_sg_sock_data_t; -void *gras_libdata_by_name_from_remote(const char *name, m_process_t p); +XBT_PUBLIC void *gras_libdata_by_name_from_remote(const char *name, m_process_t p); /* The same function by id would be really dangerous. * * Indeed, it would rely on the fact that all process register libdatas in diff --git a/src/msg/private.h b/src/msg/private.h index 697381fba0..3e30b4f504 100644 --- a/src/msg/private.h +++ b/src/msg/private.h @@ -95,8 +95,8 @@ typedef struct MSG_Global { extern MSG_Global_t msg_global; /************************** Configuration support ********************************/ -void msg_config_init(void); /* create the config set, call this before use! */ -void msg_config_finalize(void); /* destroy the config set, call this at cleanup. */ +XBT_PUBLIC void msg_config_init(void); /* create the config set, call this before use! */ +XBT_PUBLIC void msg_config_finalize(void); /* destroy the config set, call this at cleanup. */ extern int _msg_init_status; /* 0: beginning of time; 1: pre-inited (cfg_set created); 2: inited (running) */ @@ -113,22 +113,22 @@ extern xbt_cfg_t _msg_cfg_set; get_state(MSG_host_self()->simdata->host)==SURF_CPU_ON,\ "Host failed, you cannot call this function.") -m_host_t __MSG_host_create(const char *name, void *workstation, +XBT_PUBLIC m_host_t __MSG_host_create(const char *name, void *workstation, void *data); -void __MSG_host_destroy(m_host_t host); -void __MSG_task_execute(m_process_t process, m_task_t task); -MSG_error_t __MSG_wait_for_computation(m_process_t process, m_task_t task); -MSG_error_t __MSG_task_wait_event(m_process_t process, m_task_t task); +XBT_PUBLIC void __MSG_host_destroy(m_host_t host); +XBT_PUBLIC void __MSG_task_execute(m_process_t process, m_task_t task); +XBT_PUBLIC MSG_error_t __MSG_wait_for_computation(m_process_t process, m_task_t task); +XBT_PUBLIC MSG_error_t __MSG_task_wait_event(m_process_t process, m_task_t task); -int __MSG_process_block(double max_duration, const char *info); -MSG_error_t __MSG_process_unblock(m_process_t process); -int __MSG_process_isBlocked(m_process_t process); +XBT_PUBLIC int __MSG_process_block(double max_duration, const char *info); +XBT_PUBLIC MSG_error_t __MSG_process_unblock(m_process_t process); +XBT_PUBLIC int __MSG_process_isBlocked(m_process_t process); -void __MSG_display_process_status(void); +XBT_PUBLIC void __MSG_display_process_status(void); -m_task_t task_mallocator_new_f(void); -void task_mallocator_free_f(m_task_t task); -void task_mallocator_reset_f(m_task_t task); +XBT_PUBLIC m_task_t task_mallocator_new_f(void); +XBT_PUBLIC void task_mallocator_free_f(m_task_t task); +XBT_PUBLIC void task_mallocator_reset_f(m_task_t task); #ifdef ALVIN_SPECIAL_LOGING #define PAJE_PROCESS_STATE(process,state)\ diff --git a/src/simdag/private.h b/src/simdag/private.h index bd3c2ce45e..291c8a79b3 100644 --- a/src/simdag/private.h +++ b/src/simdag/private.h @@ -101,17 +101,17 @@ typedef struct SD_dependency { /* SimDag private functions */ -SD_link_t __SD_link_create(void *surf_link, void *data); -void __SD_link_destroy(void *link); +XBT_PUBLIC SD_link_t __SD_link_create(void *surf_link, void *data); +XBT_PUBLIC void __SD_link_destroy(void *link); -SD_workstation_t __SD_workstation_create(void *surf_workstation, void *data); -void __SD_workstation_destroy(void *workstation); -int __SD_workstation_is_busy(SD_workstation_t workstation); +XBT_PUBLIC SD_workstation_t __SD_workstation_create(void *surf_workstation, void *data); +XBT_PUBLIC void __SD_workstation_destroy(void *workstation); +XBT_PUBLIC int __SD_workstation_is_busy(SD_workstation_t workstation); -void __SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state); -void __SD_task_really_run(SD_task_t task); -int __SD_task_try_to_run(SD_task_t task); -void __SD_task_just_done(SD_task_t task); +XBT_PUBLIC void __SD_task_set_state(SD_task_t task, e_SD_task_state_t new_state); +XBT_PUBLIC void __SD_task_really_run(SD_task_t task); +XBT_PUBLIC int __SD_task_try_to_run(SD_task_t task); +XBT_PUBLIC void __SD_task_just_done(SD_task_t task); /* Functions to test if the task is in a given state. */ diff --git a/src/xbt/context_win32.h b/src/xbt/context_win32.h index 6fc82039f7..022be48830 100644 --- a/src/xbt/context_win32.h +++ b/src/xbt/context_win32.h @@ -41,9 +41,9 @@ typedef struct __ucontext { } ucontext_t; -int getcontext(ucontext_t *ucp); -int setcontext(const ucontext_t *ucp); -int makecontext(ucontext_t *, void (*)(), int, ...); -int swapcontext(ucontext_t *, const ucontext_t *); +XBT_PUBLIC int getcontext(ucontext_t *ucp); +XBT_PUBLIC int setcontext(const ucontext_t *ucp); +XBT_PUBLIC int makecontext(ucontext_t *, void (*)(), int, ...); +XBT_PUBLIC int swapcontext(ucontext_t *, const ucontext_t *); #endif /* UCONTEXT_H */ -- 2.20.1