broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count);
int broadcaster_build_chain(broadcaster_t bc);
int broadcaster_send_file(broadcaster_t bc);
-int broadcaster_finish(broadcaster_t bc);
/* Tasks */
int broadcaster(int argc, char *argv[]);
extern int smx_context_stack_size;
extern int smx_context_stack_size_was_set;
-#ifdef HAVE_THREAD_LOCAL_STORAGE
-extern __thread smx_context_t smx_current_context;
-#else
-extern smx_context_t smx_current_context;
-#endif
-
/* *********************** */
/* Context type definition */
/* *********************** */
XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_action_t, void*, size_t));
XBT_PUBLIC(void) SIMIX_comm_copy_pointer_callback(smx_action_t comm, void* buff, size_t buff_size);
XBT_PUBLIC(void) SIMIX_comm_copy_buffer_callback(smx_action_t comm, void* buff, size_t buff_size);
-XBT_PUBLIC(void) smpi_comm_copy_data_callback(smx_action_t comm, void* buff, size_t buff_size);
XBT_PUBLIC(smx_action_t) SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
XBT_PUBLIC(int) SIMIX_comm_has_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
/******************************* Host simcalls ********************************/
/* TODO use handlers and keep smx_host_t hidden from higher levels */
-XBT_PUBLIC(xbt_dict_t) simcall_host_get_dict(void);
XBT_PUBLIC(smx_host_t) simcall_host_get_by_name(const char *name);
XBT_PUBLIC(const char *) simcall_host_get_name(smx_host_t host);
XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(smx_host_t host);
XBT_PUBLIC(smx_sem_t) simcall_sem_init(int capacity);
XBT_PUBLIC(void) simcall_sem_destroy(smx_sem_t sem);
XBT_PUBLIC(void) simcall_sem_release(smx_sem_t sem);
-XBT_PUBLIC(void) simcall_sem_release_forever(smx_sem_t sem);
XBT_PUBLIC(int) simcall_sem_would_block(smx_sem_t sem);
-XBT_PUBLIC(void) simcall_sem_block_onto(smx_sem_t sem);
XBT_PUBLIC(void) simcall_sem_acquire(smx_sem_t sem);
XBT_PUBLIC(void) simcall_sem_acquire_timeout(smx_sem_t sem,
double max_duration);
-XBT_PUBLIC(unsigned int) simcall_sem_acquire_any(xbt_dynar_t sems);
XBT_PUBLIC(int) simcall_sem_get_capacity(smx_sem_t sem);
XBT_PUBLIC(double) simcall_file_read(void* ptr, size_t size, size_t nmemb, smx_file_t stream);
XBT_PUBLIC(xbt_dynar_t) xbt_dynar_new(const unsigned long elm_size,
void_f_pvoid_t const free_f);
-XBT_PUBLIC(xbt_dynar_t) xbt_dynar_new_sync(const unsigned long elm_size,
- void_f_pvoid_t const free_f);
XBT_PUBLIC(void) xbt_dynar_free(xbt_dynar_t * dynar);
XBT_PUBLIC(void) xbt_dynar_free_voidp(void *dynar);
XBT_PUBLIC(void) xbt_dynar_free_container(xbt_dynar_t * dynar);
/* Free a block allocated by `mmalloc', `mrealloc' or `mcalloc'. */
XBT_PUBLIC( void ) mfree(xbt_mheap_t md, void *ptr);
-/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
-XBT_PUBLIC( void ) *mmemalign(xbt_mheap_t md, size_t alignment, size_t size);
-
-/* Allocate SIZE bytes on a page boundary. */
-XBT_PUBLIC( void ) *mvalloc(xbt_mheap_t md, size_t size);
-
XBT_PUBLIC( xbt_mheap_t ) xbt_mheap_new(int fd, void *baseaddr);
XBT_PUBLIC( void ) xbt_mheap_destroy_no_free(xbt_mheap_t md);
/** @brief Releases the given mutex variable */
XBT_PUBLIC(void) xbt_mutex_release(xbt_mutex_t mutex);
-/** @brief Blocks onto the given mutex variable, but only for the given amount of time. a timeout exception is raised if it was impossible to acquire it in the given time frame */
-XBT_PUBLIC(void) xbt_mutex_timedacquire(xbt_mutex_t mutex, double delay);
-
/** @brief Destroyes the given mutex variable */
XBT_PUBLIC(void) xbt_mutex_destroy(xbt_mutex_t mutex);
* @return The global reference to the original java task
* instance.
*/
-jobject jtask_new_global_ref(jobject jtask, JNIEnv * env);
+/* jobject jtask_new_global_ref(jobject jtask, JNIEnv * env); */
/**
* This function delete a global reference to a java task instance.
* @param The global refernce to delete.
* @param env The environment of the current thread.
*/
-void jtask_delete_global_ref(jobject jtask, JNIEnv * env);
+/* void jtask_delete_global_ref(jobject jtask, JNIEnv * env); */
/**
* This function associated a native task to a java task instance.
* Method destroy
* Signature (Lsimgrid/msg/Task;)V
*/
-JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_destroy
- (JNIEnv *, jobject);
+/* JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_destroy */
+/* (JNIEnv *, jobject); */
/*
* Class org_simgrid_msg_Task
#ifndef SIMGRID_LUA_H
#define SIMGRID_LUA_H
-#include "xbt/dict.h"
-#include "xbt/dynar.h"
#include <lua.h>
-extern xbt_dynar_t process_list;
-extern xbt_dict_t machine_set;
-
-typedef struct s_process_t {
- int argc;
- char **argv;
- char *host;
-} s_process_t;
-
-void s_process_free(void *process);
-
-/* UNIX files */
-void generate_sim(const char *project);
-void generate_rl(const char *project);
-void generate_makefile_am(const char *project);
-void generate_makefile_local(const char *project);
-
/* ********************************************************************************* */
/* Plaftorm functions */
/* ********************************************************************************* */
extern int _sg_mc_max_depth;
extern int _sg_mc_visited;
-extern char*_surf_mc_property_file; /* fixme: better location? */
-
extern xbt_dynar_t mc_heap_comparison_ignore;
extern xbt_dynar_t stacks_areas;
extern void *maestro_stack_start;
XBT_PUBLIC(void) MC_init(void);
XBT_PUBLIC(void) MC_exit(void);
-XBT_PUBLIC(void) MC_exit_liveness(void);
XBT_PUBLIC(void) MC_modelcheck_safety(void);
XBT_PUBLIC(void) MC_modelcheck_liveness(void);
XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double);
extern double sg_latency_factor;
extern double sg_bandwidth_factor;
extern double sg_weight_S_parameter;
-extern int sg_maxmin_selective_update;
extern int sg_network_crosstraffic;
#ifdef HAVE_GTNETS
extern double sg_gtnets_jitter;
* You can change this behavior by setting the cpu/optim configuration
* variable to a different value.
*
- * This function is called by surf_workstation_model_init_CLM03
- * so you shouldn't have to call it by yourself.
- *
- * \see surf_workstation_model_init_CLM03()
+ * You shouldn't have to call it by yourself.
*/
XBT_PUBLIC(void) surf_cpu_model_init_Cas01(void);
* \brief Initializes the CPU model with trace integration [Deprecated]
*
* You shouldn't have to call it by yourself.
- * \see surf_workstation_model_init_CLM03()
*/
XBT_PUBLIC(void) surf_cpu_model_init_ti(void);
-/** \brief This function call the share resources function needed
- *
- */
-XBT_PUBLIC(double) generic_share_resources(double now);
-
-/** \brief This function call the update action state function needed
- *
- */
-XBT_PUBLIC(void) generic_update_actions_state(double now, double delta);
-
/** \ingroup SURF_models
* \brief The list of all available optimization modes (both for cpu and networks).
* These optimization modes can be set using --cfg=cpu/optim:... and --cfg=network/optim:...
*/
XBT_PUBLIC_DATA(s_surf_model_description_t) surf_cpu_model_description[];
-XBT_PUBLIC(void) create_workstations(void);
-
/**\brief create new host bypass the parser
*
*/
/** \ingroup SURF_models
* \brief Initializes the platform with the network model CM02
*
- * This function is called by surf_workstation_model_init_CLM03
- * or by yourself only if you plan using surf_workstation_model_init_compound
+ * You sould call this function by yourself only if you plan using
+ * surf_workstation_model_init_compound.
* See comments in the code for more information.
- *
- * \see surf_workstation_model_init_CLM03()
*/
XBT_PUBLIC(void) surf_network_model_init_CM02(void);
-/**
- * brief initialize the the network model bypassing the XML parser
- */
-XBT_PUBLIC(void) surf_network_model_init_bypass(const char *id,
- double initial_bw,
- double initial_lat);
-
#ifdef HAVE_GTNETS
/** \ingroup SURF_models
* \brief Initializes the platform with the network model GTNETS
*/
XBT_PUBLIC(void) surf_workstation_model_init_current_default(void);
-/** \ingroup SURF_models
- * \brief Initializes the platform with the workstation model CLM03
- *
- * This platform model seperates the workstation model and the network model.
- * The workstation model will be initialized with the model CLM03, the network
- * model with the model CM02 and the CPU model with the model Cas01.
- * In future releases, some other network models will be implemented and will be
- * combined with the workstation model CLM03.
- *
- */
-XBT_PUBLIC(void) surf_workstation_model_init_CLM03(void);
-
/** \ingroup SURF_models
* \brief Initializes the platform with the model KCCFLN05
*
* This function has to be called to initialize the common
* structures. Then you will have to create the environment by
* calling
- * e.g. surf_workstation_model_init_CLM03()
+ * e.g. surf_workstation_model_init_CM02()
*
- * \see surf_workstation_model_init_CLM03(), surf_workstation_model_init_compound(), surf_exit()
+ * \see surf_workstation_model_init_CM02(), surf_workstation_model_init_compound(), surf_exit()
*/
XBT_PUBLIC(void) surf_init(int *argc, char **argv); /* initialize common structures */
/* 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) */
-XBT_PUBLIC(void) parse_properties(void);
/* surf parse file related (public because called from a test suite) */
XBT_PUBLIC(void) parse_platform_file(const char *file);
-/* Stores the sets */
-XBT_PUBLIC_DATA(xbt_dict_t) set_list;
-
/* For the trace and trace:connect tag (store their content till the end of the parsing) */
XBT_PUBLIC_DATA(xbt_dict_t) traces_set_list;
XBT_PUBLIC_DATA(xbt_dict_t) trace_connect_list_host_avail;
void MC_replay(xbt_fifo_t stack, int start);
void MC_replay_liveness(xbt_fifo_t stack, int all_stack);
void MC_wait_for_requests(void);
-void MC_get_enabled_processes();
void MC_show_deadlock(smx_simcall_t req);
void MC_show_stack_safety(xbt_fifo_t stack);
void MC_dump_stack_safety(xbt_fifo_t stack);
mc_snapshot_t system_state; /* Snapshot of system state */
} s_mc_state_t, *mc_state_t;
-extern xbt_fifo_t mc_stack_safety_stateless;
-
mc_state_t MC_state_new(void);
void MC_state_delete(mc_state_t state);
void MC_state_interleave_process(mc_state_t state, smx_process_t process);
void MC_dpor_init(void);
void MC_dpor(void);
-void MC_dpor_exit(void);
void MC_init(void);
typedef struct s_mc_safety_visited_state{
}s_mc_pair_visited_t, *mc_pair_visited_t;
int MC_automaton_evaluate_label(xbt_exp_label_t l);
-mc_pair_t new_pair(mc_snapshot_t sn, mc_state_t sg, xbt_state_t st);
int reached(xbt_state_t st);
void set_pair_reached(xbt_state_t st);
int visited(xbt_state_t st);
void MC_pair_delete(mc_pair_t pair);
-void MC_exit_liveness(void);
mc_state_t MC_state_pair_new(void);
void pair_reached_free(mc_pair_reached_t pair);
void pair_reached_free_voidp(void *p);
void pair_visited_free(mc_pair_visited_t pair);
void pair_visited_free_voidp(void *p);
-void MC_init_liveness(void);
void MC_init_memory_map_info(void);
int get_heap_region_index(mc_snapshot_t s);
void MC_get_local_variables(const char *elf_file, xbt_dict_t location_list, xbt_dict_t *variables);
void print_local_variables(xbt_dict_t list);
-char *get_libsimgrid_path(void);
xbt_dict_t MC_get_location_list(const char *elf_file);
/**** Global variables ****/
*/
void MSG_mailbox_free(void *mailbox);
-/* \brief MSG_set_rate_before_read - set a rate before receiving a task
- *
- * \param mailbox The mailbox to release.
- * \param rate The new rate
- */
-double MSG_set_rate_before_read(msg_mailbox_t mailbox, double rate);
-
/* \brief MSG_mailbox_get_by_alias - get a mailbox from its alias.
*
* The function MSG_mailbox_get_by_alias returns the mailbox associated with
msg_host_t __MSG_host_create(smx_host_t workstation);
void __MSG_host_destroy(msg_host_priv_t host);
-void __MSG_display_process_status(void);
-
void MSG_process_cleanup_from_SIMIX(smx_process_t smx_proc);
void MSG_process_create_from_SIMIX(smx_process_t *process, const char *name,
xbt_main_func_t code, void *data,
# include <sys/sysctl.h>
#endif
-/****
- **** Networking
- ****/
-
-
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-# include <netinet/in.h> /* sometimes required for #include <arpa/inet.h> */
-# include <netinet/tcp.h> /* TCP_NODELAY */
-# include <netdb.h> /* getprotobyname() */
-# include <arpa/inet.h> /* inet_ntoa() */
-# include <sys/types.h> /* sometimes required for fd_set */
-# endif
-
-
-#ifndef HAVE_WINSOCK_H
-# define tcp_read( s, buf, len) read( s, buf, len )
-# define tcp_write( s, buf, len) write( s, buf, len )
-# define sock_errno errno
-# define sock_errstr(err) strerror(err)
-
-# ifdef SHUT_RDWR
-# define tcp_close( s ) (shutdown( s, SHUT_RDWR ), close( s ))
-# else
-# define tcp_close( s ) close( s )
-# endif
-#endif /* windows or unix ? */
-
/****
**** File handling
****/
# include <execinfo.h>
#endif
-/****
- **** Some debugging functions. Can't we find a better place for this??
- ****/
-void hexa_print(const char *name, unsigned char *data, int size);
-const char *hexa_str(unsigned char *data, int size, int downside);
-
#endif /* SIMGRID_PORTABLE_H */
/*************************** New simcall interface ****************************/
-smx_simcall_t __SIMIX_simcall(e_smx_simcall_t simcall_id, u_smx_scalar_t *args);
-
typedef smx_action_t (*simcall_handler_t)(u_smx_scalar_t *);
extern const char *simcall_types[];
xbt_dynar_foreach(sg_platf_route_cb_list, iterator, fun) {
fun(route);
}
-}void sg_platf_new_ASroute(sg_platf_route_cbarg_t ASroute) {
+}
+void sg_platf_new_ASroute(sg_platf_route_cbarg_t ASroute) {
unsigned int iterator;
sg_platf_route_cb_t fun;
xbt_dynar_foreach(sg_platf_ASroute_cb_list, iterator, fun) {
xbt_dynar_foreach(sg_platf_bypassRoute_cb_list, iterator, fun) {
fun(bypassRoute);
}
-}void sg_platf_new_bypassASroute(sg_platf_route_cbarg_t bypassASroute) {
+}
+void sg_platf_new_bypassASroute(sg_platf_route_cbarg_t bypassASroute) {
unsigned int iterator;
sg_platf_route_cb_t fun;
xbt_dynar_foreach(sg_platf_bypassASroute_cb_list, iterator, fun) {
//void surf_config(const char *name, va_list pa);
void net_action_recycle(surf_action_t action);
-double net_action_get_remains(surf_action_t action);
#ifdef HAVE_LATENCY_BOUND_TRACKING
int net_get_link_latency_limited(surf_action_t action);
#endif
/* from surf_instr.c */
void TRACE_surf_host_set_power(double date, const char *resource, double power);
void TRACE_surf_link_set_bandwidth(double date, const char *resource, double bandwidth);
-void TRACE_surf_link_set_latency(double date, const char *resource, double latency);
#endif /* _SURF_SURF_PRIVATE_H */
xbt_dynar_push(model_list, &surf_workstation_model);
sg_platf_host_add_cb(workstation_new);
-// sg_platf_postparse_add_cb(create_workstations);
}
void surf_workstation_model_init_compound()
surf_workstation_model_init_internal();
xbt_dynar_push(model_list, &surf_workstation_model);
sg_platf_host_add_cb(workstation_new);
-// sg_platf_postparse_add_cb(create_workstations);
}
# error "Unknown compiler - please report the problems to the main simgrid mailing list (http://gforge.inria.fr/mail/?group_id=12)"
#endif
-typedef int socklen_t;
-#define tcp_read( s, buf, len ) recv( s, buf, len, 0 )
-#define tcp_write( s, buf, len ) send( s, buf, len, 0 )
-#define ioctl( s, c, a ) ioctlsocket( (s), (c), (a) )
-#define ioctl_t u_long
-#define AC_SOCKET_INVALID ((unsigned int) ~0)
-
-#ifdef SD_BOTH
-#define tcp_close(s) (shutdown( s, SD_BOTH ), closesocket(s))
-#else
-#define tcp_close( s ) closesocket( s )
-#endif
-
#ifndef _XBT_VISUALC_COMPILER
#ifndef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
#endif
#endif
-
-
-#ifdef sock_errno
- #undef sock_errno
-#endif
-
-#define sock_errno WSAGetLastError()
-
-#ifdef sock_errstr
- #undef sock_errstr
-#endif
-
-#define sock_errstr(err) xbt_wsa_err2string(err)
-
-const char *xbt_wsa_err2string(int errcode);
-
#ifdef S_IRGRP
#undef S_IRGRP
#endif
THROWF(timeout_error, 0, "mutex %p not ready", mutex);
default:
THROWF(system_error, errcode,
- "xbt_mutex_timedacquire(%p) failed: %s", mutex,
+ "xbt_os_mutex_timedacquire(%p) failed: %s", mutex,
strerror(errcode));
}
void Normal_Test_Send ( double *, int );
void Normal_Test_Recv ( double *, int );
void Buffered_Test_Send ( double *, int );
-void Buffered_Test_Recv ( double *, int );
+/* void Buffered_Test_Recv ( double *, int ); */
void Async_Test_Send ( double *, int );
void Async_Test_Recv ( double *, int );
int Check_Data ( double *, int );