From 71e18d8128073821eefda2bf9657a442aa79c04b Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 12 Feb 2020 11:49:12 +0100 Subject: [PATCH] document the actor-{daemon,join,kill} C examples --- docs/Build.sh | 1 + examples/README.rst | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/Build.sh b/docs/Build.sh index 6a150ef8eb..352254b39a 100755 --- a/docs/Build.sh +++ b/docs/Build.sh @@ -47,6 +47,7 @@ echo echo "Undocumented examples:" for ex in $( (cd .. ; \ find examples/s4u/ -name '*.cpp'; \ + find examples/c/ -name '*.c'; \ find examples/python -name '*.py'; \ ) | sort ) do diff --git a/examples/README.rst b/examples/README.rst index d02d5085f3..093da96d46 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -90,11 +90,16 @@ Starting and Stoping Actors .. example-tab:: examples/s4u/actor-kill/s4u-actor-kill.cpp See also :cpp:func:`void simgrid::s4u::Actor::kill(void)`, :cpp:func:`void simgrid::s4u::Actor::kill_all()`, - :cpp:func:`simgrid::s4u::this_actor::exit`. + :cpp:func:`simgrid::s4u::this_actor::exit`, :cpp:func:`simgrid::s4u::this_actor::on_exit`. .. example-tab:: examples/python/actor-kill/actor-kill.py - See also :py:func:`simgrid.Actor.kill`, :py:func:`simgrid.Actor.kill_all`, :py:func:`simgrid.this_actor.exit`. + See also :py:func:`simgrid.Actor.kill`, :py:func:`simgrid.Actor.kill_all`, :py:func:`simgrid.this_actor.exit`, + :py:func:`simgrid.this_actor.on_exit`. + + .. example-tab:: examples/c/actor-kill/actor-kill.c + + See also :cpp:func:`sg_actor_kill`, :cpp:func:`sg_actor_kill_all`, :cpp:func:`sg_actor_exit`, :cpp:func:`sg_actor_on_exit`. - **Controling the actor life cycle from the XML:** You can specify a start time and a kill time in the deployment file. @@ -123,6 +128,10 @@ Starting and Stoping Actors See also :py:func:`simgrid.Actor.daemonize()` and :py:func:`simgrid.Actor.is_daemon()`. + .. example-tab:: examples/c/actor-daemon/actor-daemon.c + + See also :cpp:func:`sg_actor_daemonize` and :cpp:func:`sg_actor_is_daemon`. + Inter-Actors Interactions ------------------------- @@ -173,6 +182,10 @@ synchronization objects `. See also :py:func:`simgrid.Actor.join()`. + .. example-tab:: examples/c/actor-join/actor-join.c + + See also :cpp:func:`sg_actor_join`. + - **Yielding to other actors**. The ```yield()``` function interrupts the execution of the current actor, leaving a chance to the other actors that are ready to run -- 2.20.1