X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/10ceac5fd14fb0426b5c93bda85676a79b02d0be..04f2226028a38d3e30f5d7d30ef53b7274f34cca:/src/simix/smx_network_private.h diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 9c155946ec..c3a0c3444a 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -1,54 +1,15 @@ -/* 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 - -#include - -#include - -#include "simgrid/simix.h" -#include "popping_private.h" +#include "simgrid/s4u/Mailbox.hpp" +#include "src/kernel/activity/MailboxImpl.hpp" #include "src/simix/ActorImpl.hpp" -namespace simgrid { -namespace simix { - -/** @brief Rendez-vous point datatype */ - -class Mailbox { -public: - Mailbox(const char* name) : piface_(this), name(xbt_strdup(name)) {} - ~Mailbox() { - xbt_free(name); - } - - simgrid::s4u::Mailbox piface_; // Our interface - char* name; - std::deque comm_queue; - boost::intrusive_ptr permanent_receiver; //process which the mailbox is attached to - std::deque done_comm_queue;//messages already received in the permanent receive mode -}; - -} -} - -XBT_PRIVATE void SIMIX_mailbox_exit(); - -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_activity_t comm); - -XBT_PRIVATE void SIMIX_mbox_set_receiver(smx_mailbox_t mbox, smx_actor_t proc); 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 *, smx_activity_t),