1 /* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef _SIMIX_NETWORK_PRIVATE_H
8 #define _SIMIX_NETWORK_PRIVATE_H
10 #include "simgrid/simix.h"
11 #include "popping_private.h"
13 /** @brief Rendez-vous point datatype */
14 typedef struct s_smx_rvpoint {
18 smx_process_t permanent_receiver; //process which the mailbox is attached to
19 xbt_fifo_t done_comm_fifo;//messages already received in the permanent receive mode
22 void SIMIX_network_init(void);
23 void SIMIX_network_exit(void);
25 #ifdef HAVE_LATENCY_BOUND_TRACKING
26 XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_synchro_t comm);
29 smx_rdv_t SIMIX_rdv_create(const char *name);
30 void SIMIX_rdv_destroy(smx_rdv_t rdv);
31 smx_rdv_t SIMIX_rdv_get_by_name(const char *name);
32 void SIMIX_rdv_remove(smx_rdv_t rdv, smx_synchro_t comm);
33 int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host);
34 smx_synchro_t SIMIX_rdv_get_head(smx_rdv_t rdv);
35 void SIMIX_rdv_set_receiver(smx_rdv_t rdv, smx_process_t proc);
36 smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv);
37 smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
38 void *dst_buff, size_t *dst_buff_size,
39 int (*)(void *, void *, smx_synchro_t),
40 void (*copy_data_fun)(smx_synchro_t, void*, size_t),
41 void *data, double rate);
42 void SIMIX_comm_destroy(smx_synchro_t synchro);
43 void SIMIX_comm_destroy_internal_actions(smx_synchro_t synchro);
44 smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src,
45 int tag, int (*match_fun)(void *, void *, smx_synchro_t), void *data);
46 void SIMIX_post_comm(smx_synchro_t synchro);
47 void SIMIX_comm_cancel(smx_synchro_t synchro);
48 double SIMIX_comm_get_remains(smx_synchro_t synchro);
49 e_smx_state_t SIMIX_comm_get_state(smx_synchro_t synchro);
50 void SIMIX_comm_suspend(smx_synchro_t synchro);
51 void SIMIX_comm_resume(smx_synchro_t synchro);
52 smx_process_t SIMIX_comm_get_src_proc(smx_synchro_t synchro);
53 smx_process_t SIMIX_comm_get_dst_proc(smx_synchro_t synchro);