#include <xbt/functional.hpp>
#include <xbt/string.hpp>
#include <simgrid/chrono.hpp>
#include <xbt/functional.hpp>
#include <xbt/string.hpp>
#include <simgrid/chrono.hpp>
- /** Retrieves the PID of that actor */
- int pid();
- /** Retrieves the PPID of that actor */
- int ppid();
+ /** Retrieves the PID of that actor
+ *
+ * actor_id_t is an alias for unsigned long */
+ aid_t pid();
+ /** Retrieves the PPID of that actor
+ *
+ * actor_id_t is an alias for unsigned long */
+ aid_t ppid();
/** If set to true, the actor will automatically restart when its host reboots */
void setAutoRestart(bool autorestart);
/** If set to true, the actor will automatically restart when its host reboots */
void setAutoRestart(bool autorestart);
- * It will only notice your request when doing a simcall next time (a communication or similar).
- * SimGrid sometimes have issues when you kill actors that are currently communicating and such.
+ * Any blocking activity will be canceled, and it will be rescheduled to free its memory.
+ * Being killed is not something that actors can defer or avoid.
+ *
+ * SimGrid still have sometimes issues when you kill actors that are currently communicating and such.
* See \ref Comm for the full communication API (including non blocking communications).
*/
XBT_PUBLIC(void*) recv(MailboxPtr chan);
* See \ref Comm for the full communication API (including non blocking communications).
*/
XBT_PUBLIC(void*) recv(MailboxPtr chan);
/** 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) send(MailboxPtr chan, void* payload, double simulatedSize);
/** 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) send(MailboxPtr chan, void* payload, double simulatedSize);
- /** @brief Returns the PID of the current actor. */
- XBT_PUBLIC(int) pid();
+ XBT_PUBLIC(CommPtr) isend(MailboxPtr chan, void* payload, double simulatedSize);
+ XBT_PUBLIC(void) dsend(MailboxPtr chan, void* payload, double simulatedSize);
- /** @brief Returns the PPID of the current actor. */
- XBT_PUBLIC(int) ppid();
+ /** @brief Returns the actor ID of the current actor (same as pid). */
+ XBT_PUBLIC(aid_t) pid();
+
+ /** @brief Returns the ancestor's actor ID of the current actor (same as ppid). */
+ XBT_PUBLIC(aid_t) ppid();