X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dc3c3416c4cca30fef7c29422d45094687f59893..60059959d6d517261ca7f4176b0267bc37caf04d:/src/simix/smx_network_private.h diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 263d0ba403..a980644d1b 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2007-2010, 2012-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -8,7 +8,7 @@ #define _SIMIX_NETWORK_PRIVATE_H #include "simgrid/simix.h" -#include "smx_smurf_private.h" +#include "popping_private.h" /** @brief Rendez-vous point datatype */ typedef struct s_smx_rvpoint { @@ -23,7 +23,7 @@ void SIMIX_network_init(void); void SIMIX_network_exit(void); #ifdef HAVE_LATENCY_BOUND_TRACKING -XBT_INLINE XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm); +XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm); #endif smx_rdv_t SIMIX_rdv_create(const char *name); @@ -34,23 +34,22 @@ int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host); smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv); void SIMIX_rdv_set_receiver(smx_rdv_t rdv, smx_process_t proc); smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv); -void SIMIX_comm_start(smx_action_t action); smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *, smx_action_t), void (*clean_fun)(void *), // used to free the action in case of problem after a detached send + void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, int detached); smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size, - int (*)(void *, void *, smx_action_t), void *data); -smx_action_t SIMIX_comm_irecv_bounded(smx_process_t dst_proc, smx_rdv_t rdv, - void *dst_buff, size_t *dst_buff_size, - int (*)(void *, void *, smx_action_t), void *data, double rate); + int (*)(void *, void *, smx_action_t), + void (*copy_data_fun)(smx_action_t, void*, size_t), + void *data, double rate); void SIMIX_comm_destroy(smx_action_t action); void SIMIX_comm_destroy_internal_actions(smx_action_t action); -smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int src, +smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src, int tag, int (*match_fun)(void *, void *, smx_action_t), void *data); void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout); void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions); @@ -66,8 +65,8 @@ smx_process_t SIMIX_comm_get_src_proc(smx_action_t action); smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action); // pre prototypes -smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, - int src, int tag, +smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, + int type,int src, int tag, int (*match_fun)(void *, void *, smx_action_t), void *data); smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name); @@ -78,34 +77,29 @@ smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv); smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv); void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv, smx_process_t process); -void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_rdv_t rdv, +void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *,smx_action_t), + void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, double timeout); -smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_rdv_t rdv, +smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *,smx_action_t), void (*clean_fun)(void *), + void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, int detached); void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, - void *dst_buff, size_t *dst_buff_size, - int (*match_fun)(void *, void *, smx_action_t), - void *data, double timeout); -void SIMIX_pre_comm_recv_bounded(smx_simcall_t simcall, smx_rdv_t rdv, - void *dst_buff, size_t *dst_buff_size, - int (*match_fun)(void *, void *, smx_action_t), - void *data, double timeout, double rate); + void *dst_buff, size_t *dst_buff_size, + int (*match_fun)(void *, void *, smx_action_t), + void (*copy_data_fun)(smx_action_t, void*, size_t), + void *data, double timeout, double rate); smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size, int (*match_fun)(void *, void *, smx_action_t), - void *data); -smx_action_t SIMIX_pre_comm_irecv_bounded(smx_simcall_t simcall, smx_rdv_t rdv, - void *dst_buff, size_t *dst_buff_size, - int (*match_fun)(void *, void *, smx_action_t), + void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, double rate); -void SIMIX_pre_comm_destroy(smx_simcall_t simcall, smx_action_t action); void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action); double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action); e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action); @@ -113,5 +107,8 @@ void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action); void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action); smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action); smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action); +#ifdef HAVE_LATENCY_BOUND_TRACKING +int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action); +#endif #endif