XBT_PUBLIC(void) MSG_zone_get_hosts(msg_netzone_t zone, xbt_dynar_t whereto);
/* Deprecated forms of the previous functions */
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_get_root since v3.16")
- msg_netzone_t MSG_environment_get_routing_root() {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_get_root() instead: v3.19 will remove MSG_environment_get_routing_root() completely.") msg_netzone_t
+ MSG_environment_get_routing_root()
+{
return MSG_zone_get_root();
}
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_get_name since v3.16")
- const char* MSG_environment_as_get_name(msg_netzone_t zone) {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_get_name() instead: v3.19 will remove MSG_environment_as_get_name() completely.") const
+ char* MSG_environment_as_get_name(msg_netzone_t zone)
+{
return MSG_zone_get_name(zone);
}
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_get_by_name since v3.16")
- msg_netzone_t MSG_environment_as_get_by_name(const char* name) {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_get_by_name() instead: v3.19 will remove MSG_environment_as_get_by_name() completely.") msg_netzone_t
+ MSG_environment_as_get_by_name(const char* name)
+{
return MSG_zone_get_by_name(name);
}
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_get_sons since v3.16")
- xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t zone) {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_get_sons() instead: v3.19 will remove MSG_environment_as_get_routing_sons() completely.") xbt_dict_t
+ MSG_environment_as_get_routing_sons(msg_netzone_t zone)
+{
xbt_dict_t res = xbt_dict_new_homogeneous(NULL);
MSG_zone_get_sons(zone, res);
return res;
}
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_get_property_value since v3.16")
- const char* MSG_environment_as_get_property_value(msg_netzone_t zone, const char* name) {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_get_property_value() instead: v3.19 will remove MSG_environment_as_get_property_value() completely.")
+ const char* MSG_environment_as_get_property_value(msg_netzone_t zone, const char* name)
+{
return MSG_zone_get_property_value(zone, name);
}
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_set_property_value since v3.16")
- void MSG_environment_as_set_property_value(msg_netzone_t zone, const char* name, char* value) {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_set_property_value() instead: v3.19 will remove MSG_environment_as_set_property_value() "
+ "completely.") void MSG_environment_as_set_property_value(msg_netzone_t zone, const char* name, char* value)
+{
MSG_zone_set_property_value(zone, name, value);
}
-static inline XBT_ATTRIB_DEPRECATED("Please use MSG_zone_get_hosts since v3.16")
- xbt_dynar_t MSG_environment_as_get_hosts(msg_netzone_t zone) {
+static inline XBT_ATTRIB_DEPRECATED_v319(
+ "Use MSG_zone_get_hosts() instead: v3.19 will remove MSG_environment_as_get_hosts() completely.") xbt_dynar_t
+ MSG_environment_as_get_hosts(msg_netzone_t zone)
+{
xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t), NULL);
MSG_zone_get_hosts(zone, res);
return res;
this_actor::sleep_until(timeout_native.time_since_epoch().count());
}
- XBT_ATTRIB_DEPRECATED("Use sleep_for()")
- inline void sleep(double duration)
+ XBT_ATTRIB_DEPRECATED_v320("Use sleep_for(): v3.20 will drop sleep() completely.") inline void sleep(double duration)
{
return sleep_for(duration);
}
*
* See \ref Comm for the full communication API (including non blocking communications).
*/
- XBT_PUBLIC(void*) XBT_ATTRIB_DEPRECATED("Please use Mailbox::get") recv(MailboxPtr chan); // 3.17
- XBT_PUBLIC(void*) XBT_ATTRIB_DEPRECATED("Please use Mailbox::get") recv(MailboxPtr chan, double timeout); // 3.17
+ XBT_PUBLIC(void*)
+ XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will remove Actor::recv() completely.") recv(MailboxPtr chan);
+ XBT_PUBLIC(void*)
+ XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get(): v3.20 will remove Actor::recv() completely.")
+ recv(MailboxPtr chan, double timeout);
XBT_PUBLIC(CommPtr)
- XBT_ATTRIB_DEPRECATED("Please use Mailbox::recv_async") irecv(MailboxPtr chan, void** data); // 3.17
+ XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::recv_async(): v3.20 will remove Actor::irecv() completely.")
+ irecv(MailboxPtr chan, void** data);
/** Block the actor until it delivers a message of the given simulated size to the given mailbox
*
* See \ref Comm for the full communication API (including non blocking communications).
*/
XBT_PUBLIC(void)
- XBT_ATTRIB_DEPRECATED("Please use Mailbox::put") send(MailboxPtr chan, void* payload, double simulatedSize); // 3.17
+ XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will remove Actor::send() completely.")
+ send(MailboxPtr chan, void* payload, double simulatedSize); // 3.17
XBT_PUBLIC(void)
- XBT_ATTRIB_DEPRECATED("Please use Mailbox::put")
- send(MailboxPtr chan, void* payload, double simulatedSize, double timeout); // 3.17
+ XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put(): v3.20 will remove Actor::send() completely.")
+ send(MailboxPtr chan, void* payload, double simulatedSize, double timeout); // 3.17
XBT_PUBLIC(CommPtr)
- XBT_ATTRIB_DEPRECATED("Please use Mailbox::put_async") isend(MailboxPtr chan, void* payload, double simulatedSize);
+ XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_async(): v3.20 will remove Actor::isend() completely.")
+ isend(MailboxPtr chan, void* payload, double simulatedSize);
/** @brief Returns the actor ID of the current actor (same as pid). */
XBT_PUBLIC(aid_t) getPid();
-/* Copyright (c) 2006-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-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. */
#include <simgrid/forward.h>
#include <simgrid/s4u/Activity.hpp>
-#include <simgrid/s4u/Mailbox.hpp> // DEPRECATED 3.17
+#include <simgrid/s4u/Mailbox.hpp> // DEPRECATED 3.20
#include <simgrid/s4u/forward.hpp>
#include <vector>
return idx;
}
/** 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
+ static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_init(): v3.20 will remove Comm::send_init() completely.")
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
+ static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::put_init(): v3.20 will remove Comm::send_init() completely.")
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 XBT_ATTRIB_DEPRECATED("please use Mailbox::put_async") // 3.17
+ static CommPtr XBT_ATTRIB_DEPRECATED_v320(
+ "Use Mailbox::put_async(): v3.20 will remove Comm::send_async() completely.")
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 XBT_ATTRIB_DEPRECATED("please use Mailbox::get_init") // 3.17
+ static CommPtr XBT_ATTRIB_DEPRECATED_v320("Use Mailbox::get_init(): v3.20 will remove Comm::recv_init() completely.")
recv_init(MailboxPtr from)
{
return from->get_init();
}
/** Creates and start an async recv to the mailbox @p from */
- static CommPtr XBT_ATTRIB_DEPRECATED("please use Mailbox::get_async") // 3.17
+ static CommPtr XBT_ATTRIB_DEPRECATED_v320(
+ "Use Mailbox::get_async(): v3.20 will remove Comm::recv_async() completely.")
recv_async(MailboxPtr from, void** data)
{
return from->get_async(data);
void notify_one();
void notify_all();
- XBT_ATTRIB_DEPRECATED("Use notify_one() instead")
- void notify() { notify_one(); }
+ XBT_ATTRIB_DEPRECATED_v319("Use notify_one(): v3.19 will remove notify() completely.") void notify() { notify_one(); }
};
using ConditionVariablePtr = ConditionVariable::Ptr;
/* xbt.h - Public interface to the xbt (simgrid's toolbox) */
-/* Copyright (c) 2004-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-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. */
#define XBT_ATTRIB_NORETURN __attribute__((noreturn))
#define XBT_ATTRIB_UNUSED __attribute__((unused))
-#define XBT_ATTRIB_DEPRECATED(m) __attribute__((deprecated(m)))
+#define XBT_ATTRIB_DEPRECATED_v319(msg) __attribute__((deprecated(msg))) /* Will be dropped in v3.19 */
+#define XBT_ATTRIB_DEPRECATED_v320(msg) __attribute__((deprecated(msg))) /* Will be dropped in v3.20 */
/* Constructor priorities exist since gcc 4.3. Apparently, they are however not
* supported on Macs. */