- /** Creates (but don't start) a data transmission to that mailbox */
+ /** Creates (but don't start) a data transmission to that mailbox.
+ *
+ * Please note that if you send a pointer to some data, you must ensure that your data remains live during the
+ * communication, or the receiver will get a pointer to a garbled memory area.
+ */
- /** Creates and start a data transmission to that mailbox */
+ /** Creates and start a data transmission to that mailbox.
+ *
+ * Please note that if you send a pointer to some data, you must ensure that your data remains live during the
+ * communication, or the receiver will get a pointer to a garbled memory area.
+ */
CommPtr put_async(void* data, uint64_t simulated_size_in_bytes);
kernel::activity::ActivityImplPtr iprobe(int type, bool (*match_fun)(void*, void*, kernel::activity::CommImpl*),
void* data);
CommPtr put_async(void* data, uint64_t simulated_size_in_bytes);
kernel::activity::ActivityImplPtr iprobe(int type, bool (*match_fun)(void*, void*, kernel::activity::CommImpl*),
void* data);
- /** Blocking data transmission */
+ /** Blocking data transmission.
+ *
+ * Please note that if you send a pointer to some data, you must ensure that your data remains live during the
+ * communication, or the receiver will get a pointer to a garbled memory area.
+ */
void put(void* payload, uint64_t simulated_size_in_bytes);
/** Blocking data transmission with timeout */
void put(void* payload, uint64_t simulated_size_in_bytes, double timeout);
void put(void* payload, uint64_t simulated_size_in_bytes);
/** Blocking data transmission with timeout */
void put(void* payload, uint64_t simulated_size_in_bytes, double timeout);
/** Creates (but don't start) a data reception onto that mailbox */
CommPtr get_init();
/** Creates and start an async data reception to that mailbox */
/** Creates (but don't start) a data reception onto that mailbox */
CommPtr get_init();
/** Creates and start an async data reception to that mailbox */
template <typename T> CommPtr get_async(T** data);
/** Blocking data reception */
template <typename T> T* get();
template <typename T> CommPtr get_async(T** data);
/** Blocking data reception */
template <typename T> T* get();
template <typename T> std::unique_ptr<T> get_unique() { return std::unique_ptr<T>(get<T>()); }
/** Blocking data reception with timeout */
template <typename T> T* get(double timeout);
template <typename T> std::unique_ptr<T> get_unique() { return std::unique_ptr<T>(get<T>()); }
/** Blocking data reception with timeout */
template <typename T> T* get(double timeout);
inline CommPtr Mailbox::get_async(void** data) // XBT_ATTRIB_DEPRECATED_v331
{
return get_async<void>(data);
inline CommPtr Mailbox::get_async(void** data) // XBT_ATTRIB_DEPRECATED_v331
{
return get_async<void>(data);