Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent.
[simgrid.git] / src / msg / msg_mailbox.cpp
1 /* Mailboxes in MSG */
2
3 /* Copyright (c) 2008-2017. The SimGrid Team. All rights reserved.          */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #include "simgrid/s4u/Mailbox.hpp"
9 #include "src/msg/msg_private.hpp"
10
11 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_mailbox, msg, "Logging specific to MSG (mailbox)");
12
13 extern "C" {
14
15 /** \ingroup msg_mailbox_management
16  * \brief Set the mailbox to receive in asynchronous mode
17  *
18  * All messages sent to this mailbox will be transferred to the receiver without waiting for the receive call.
19  * The receive call will still be necessary to use the received data.
20  * If there is a need to receive some messages asynchronously, and some not, two different mailboxes should be used.
21  *
22  * \param alias The name of the mailbox
23  */
24 void MSG_mailbox_set_async(const char *alias){
25   simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(alias);
26   mailbox->setReceiver(simgrid::s4u::Actor::self());
27   XBT_VERB("%s mailbox set to receive eagerly for myself\n",alias);
28 }
29 }