- on_time_advance: each time the clock advances
- on_simulation_end: after simulation, before cleanups
- on_deadlock: as the name implies.
+ - C bindings:
+ - sg_{host,actor}_{set,get}_data() now all exist.
+ Use them to attach user data to the object.
MSG:
- convert a new set of functions to the S4U C interface and move the old MSG
- FG#28: add sg_actor_self (and other wrappers on this_actor methods)
- FG#29 and FG#33: provide a new C API to mutexes and condition variables
- FG#30: convert MSG_process_{un}ref to sg_actor_{un}ref
+ - FG#31: per-actor data
- FG#34: SG_BARRIER_SERIAL_THREAD?
- FG#35: model-checker does not like buster-produced binaries
XBT_PUBLIC void sg_actor_self_execute(double flops);
XBT_PUBLIC void sg_actor_ref(sg_actor_t actor);
XBT_PUBLIC void sg_actor_unref(sg_actor_t actor);
+XBT_PUBLIC void* sg_actor_get_data(sg_actor_t actor);
+XBT_PUBLIC void sg_actor_set_data(sg_actor_t actor, void* userdata);
SG_END_DECL()
{
intrusive_ptr_release(actor);
}
+
+/** @brief Return the user data of a #sg_actor_t */
+void* sg_actor_get_data(sg_actor_t actor)
+{
+ return actor->get_data();
+}
+/** @brief Set the user data of a #sg_actor_t */
+void sg_actor_set_data(sg_actor_t actor, void* userdata)
+{
+ actor->set_data(userdata);
+}