X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5aaf4dee2a063da0b9e1dc52672872a43a0a8e10..a784ea0b57101613a92e9fe1403d224e7ea4d501:/src/simix/smx_network_private.h diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 1451a8e1cf..0ed901f3dc 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -1,41 +1,21 @@ -/* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#ifndef _SIMIX_NETWORK_PRIVATE_H -#define _SIMIX_NETWORK_PRIVATE_H +#ifndef SIMIX_NETWORK_PRIVATE_H +#define SIMIX_NETWORK_PRIVATE_H -#include -#include +#include "simgrid/s4u/Mailbox.hpp" +#include "src/kernel/activity/MailboxImpl.hpp" +#include "src/simix/ActorImpl.hpp" -#include "simgrid/simix.h" -#include "popping_private.h" - -/** @brief Rendez-vous point datatype */ -typedef struct s_smx_mailbox { - char *name; - std::deque *comm_queue; - smx_process_t permanent_receiver; //process which the mailbox is attached to - std::deque *done_comm_queue;//messages already received in the permanent receive mode -} s_smx_mailbox_t; - -XBT_PRIVATE void SIMIX_mailbox_exit(void); - -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_PRIVATE void SIMIX_mbox_remove(smx_mailbox_t mbox, smx_synchro_t comm); - -XBT_PRIVATE void SIMIX_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t proc); -XBT_PRIVATE smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox, - void *dst_buff, size_t *dst_buff_size, - int (*)(void *, void *, smx_synchro_t), - void (*copy_data_fun)(smx_synchro_t, void*, size_t), - void *data, double rate); -XBT_PRIVATE smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_mailbox_t mbox, int type, int src, - int tag, int (*match_fun)(void *, void *, smx_synchro_t), void *data); -XBT_PRIVATE void SIMIX_post_comm(smx_synchro_t synchro); +XBT_PRIVATE smx_activity_t SIMIX_comm_irecv(smx_actor_t dst_proc, smx_mailbox_t mbox, void* dst_buff, + size_t* dst_buff_size, + int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), + void (*copy_data_fun)(smx_activity_t, void*, size_t), void* data, + double rate); +XBT_PRIVATE smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int type, + simix_match_func_t match_fun, void* data); #endif -