#include <simgrid/forward.h>
#include <simgrid/s4u/Activity.hpp>
+#include <simgrid/s4u/Mailbox.hpp> // DEPRECATED 3.17
#include <simgrid/s4u/forward.hpp>
#include <vector>
public:
friend void intrusive_ptr_release(simgrid::s4u::Comm * c);
friend void intrusive_ptr_add_ref(simgrid::s4u::Comm * c);
+ friend Mailbox; // Factory of comms
virtual ~Comm();
return idx;
}
/** Creates (but don't start) an async send to the mailbox @p dest */
- static CommPtr send_init(MailboxPtr dest);
+ static CommPtr XBT_ATTRIB_DEPRECATED("please use Mailbox::put_init") // 3.17
+ send_init(MailboxPtr dest)
+ {
+ return dest->put_init();
+ }
+ /** Creates (but don't start) an async send to the mailbox @p dest */
+ static CommPtr XBT_ATTRIB_DEPRECATED("please use Mailbox::put_init") // 3.17
+ send_init(MailboxPtr dest, void* data, int simulatedByteAmount)
+ {
+ return dest->put_init(data, simulatedByteAmount);
+ }
/** Creates and start an async send to the mailbox @p dest */
- static CommPtr send_async(MailboxPtr dest, void* data, int simulatedByteAmount);
+ static CommPtr XBT_ATTRIB_DEPRECATED("please use Mailbox::put_async") // 3.17
+ send_async(MailboxPtr dest, void* data, int simulatedByteAmount)
+ {
+ return dest->put_async(data, simulatedByteAmount);
+ }
/** Creates (but don't start) an async recv onto the mailbox @p from */
- static CommPtr recv_init(MailboxPtr from);
+ static CommPtr XBT_ATTRIB_DEPRECATED("please use Mailbox::get_init") // 3.17
+ recv_init(MailboxPtr from)
+ {
+ return from->get_init();
+ }
/** Creates and start an async recv to the mailbox @p from */
- static CommPtr recv_async(MailboxPtr from, void** data);
+ static CommPtr XBT_ATTRIB_DEPRECATED("please use Mailbox::get_async") // 3.17
+ recv_async(MailboxPtr from, void** data)
+ {
+ return from->get_async(data);
+ }
void start() override;
void wait() override;
bool test();
void cancel();
+ /** Retrieve the mailbox on which this comm acts */
+ MailboxPtr mailbox();
+
private:
double rate_ = -1;
void* dstBuff_ = nullptr;