Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Further reduce the amount of errors and warnings when rebuilding the doc
[simgrid.git] / docs / source / app_s4u.rst
index 885a6a9..8508821 100644 (file)
@@ -5,7 +5,7 @@ The S4U Interface
 
 .. raw:: html
 
-   <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
+   <object id="TOC" data="graphical-toc.svg" type="image/svg+xml"></object>
    <script>
    window.onload=function() { // Wait for the SVG to be loaded before changing it
      var elem=document.querySelector("#TOC").contentDocument.getElementById("ActorBox")
@@ -28,7 +28,7 @@ releases. When this happens, compiling your code will produce
 deprecation warnings for 4 releases (one year) before the removal of
 the old symbols. 
 If you want an API that will never ever evolve in the future, you
-should use the deprecated MSG API instead. 
+should use the :ref:`deprecated MSG API <MSG_doc>` instead. 
 
 Main Concepts
 *************
@@ -64,60 +64,60 @@ Virtual machines can also be migrated between hosts.
 The :ref:`simgrid::s4u::this_actor <API_s4u_this_actor>` namespace
 provides many helper functions to simplify the code of actors.
 
-- **Global Classes**
+- **Simulation Elements**
 
-  - :ref:`class s4u::Actor <API_s4u_Actor>`:
+  - :ref:`class Actor <API_s4u_Actor>`:
     Active entities executing your application.
-  - :ref:`class s4u::Engine <API_s4u_Engine>`
+  - :ref:`class Engine <API_s4u_Engine>`
     Simulation engine (singleton).
-  - :ref:`class s4u::Mailbox <API_s4u_Mailbox>`
-    Communication rendez-vous.
+  - :ref:`class Mailbox <API_s4u_Mailbox>`
+    Communication rendez-vous, with which actors meet each other.
 
-- **Platform Elements**
+- **Resources**
 
-  - :ref:`class s4u::Disk <API_s4u_Disk>`
+  - :ref:`class Disk <API_s4u_Disk>`
     Resource on which actors can write and read data.
-  - :ref:`class s4u::Host <API_s4u_Host>`:
+  - :ref:`class Host <API_s4u_Host>`:
     Actor location, providing computational power.
-  - :ref:`class s4u::Link <API_s4u_Link>`
+  - :ref:`class Link <API_s4u_Link>`
     Interconnecting hosts.
-  - :ref:`class s4u::NetZone <API_s4u_NetZone>`:
+  - :ref:`class NetZone <API_s4u_NetZone>`:
     Sub-region of the platform, containing resources (Hosts, Links, etc).
-  - :ref:`class s4u::VirtualMachine <API_s4u_VirtualMachine>`:
+  - :ref:`class VirtualMachine <API_s4u_VirtualMachine>`:
     Execution containers that can be moved between Hosts.
 
-- **Activities** (:ref:`class s4u::Activity <API_s4u_Activity>`):
+- **Activities** (:ref:`class Activity <API_s4u_Activity>`):
   The things that actors can do on resources
 
-  - :ref:`class s4u::Comm <API_s4u_Comm>`
+  - :ref:`class Comm <API_s4u_Comm>`
     Communication activity, started on Mailboxes and consuming links.
-  - :ref:`class s4u::Exec <API_s4u_Exec>`
+  - :ref:`class Exec <API_s4u_Exec>`
     Computation activity, started on Host and consuming CPU resources.
-  - :ref:`class s4u::Io <API_s4u_Io>`
+  - :ref:`class Io <API_s4u_Io>`
     I/O activity, started on and consumming disks.
 
-- **Synchronization Mechanisms**: Classical IPC that actors can use
+- **Synchronization Objects**: Classical IPC that actors can use
 
-  - :ref:`class s4u::Barrier <API_s4u_Barrier>`
-  - :ref:`class s4u::ConditionVariable <API_s4u_ConditionVariable>`
-  - :ref:`class s4u::Mutex <API_s4u_Mutex>`
-  - :ref:`class s4u::Semaphore <API_s4u_Semaphore>`
+  - :ref:`class Barrier <API_s4u_Barrier>`
+  - :ref:`class ConditionVariable <API_s4u_ConditionVariable>`
+  - :ref:`class Mutex <API_s4u_Mutex>`
+  - :ref:`class Semaphore <API_s4u_Semaphore>`
 
 
 .. |API_s4u_Actors| replace:: **Actors**
-.. _API_s4u_Actors: #s4u-actor
+.. _API_s4u_Actors: #api-s4u-actor
 
 .. |API_s4u_Activities| replace:: **Activities**
-.. _API_s4u_Activities: #s4u-activity
+.. _API_s4u_Activities: #api-s4u-activity
 
 .. |API_s4u_Hosts| replace:: **Hosts**
-.. _API_s4u_Hosts: #s4u-host
+.. _API_s4u_Hosts: #api-s4u-host
 
 .. |API_s4u_Links| replace:: **Links**
-.. _API_s4u_Links: #s4u-link
+.. _API_s4u_Links: #api-s4u-link
 
 .. |API_s4u_Disks| replace:: **Disks**
-.. _API_s4u_Disks: #s4u-disk
+.. _API_s4u_Disks: #api-s4u-disk
 
 .. |API_s4u_VirtualMachine| replace:: **VirtualMachines**
 
@@ -138,16 +138,16 @@ provides many helper functions to simplify the code of actors.
 
 .. |API_s4u_Mutex| replace:: **Mutex**
 
-.. THE EXAMPLES
-
-.. include:: ../../examples/s4u/README.rst
+.. _s4u_Activities:
 
 Activities
 **********
 
 Activities represent the actions that consume a resource, such as a
-:ref:`s4u::Comm <API_s4u_Comm>` that consumes the *transmitting power* of
-:ref:`s4u::Link <API_s4u_Link>` resources.
+:ref:`Comm <API_s4u_Comm>` that consumes the *transmitting power* of 
+:ref:`Link <API_s4u_Link>` resources, or an :ref:`Exec <API_s4u_Exec>`
+that consumes the *computing power* of :ref:`Host <API_s4u_Host>` resources.
+See also the :ref:`full API <API_s4u_Activity>` below.
 
 =======================
 Asynchronous Activities
@@ -338,6 +338,8 @@ that marked as permanent receiver, you should call
 memory gets properly reclaimed. This call should be at the end of the
 actor's function, not in a on_exit callback.
 
+.. _s4u_raii:
+
 Memory Management
 *****************
 
@@ -369,108 +371,513 @@ pointers (yet?). This means that it is currently impossible to destroy a
 mailbox or a link. You can still destroy an host (but probably
 shouldn't), using :cpp:func:`simgrid::s4u::Host::destroy`.
 
-C++ API Reference
-*****************
-
-.. _API_s4u_this_actor:
+.. THE EXAMPLES
 
-=========================
-namespace s4u::this_actor
-=========================
+.. include:: ../../examples/README.rst
 
-.. doxygennamespace:: simgrid::s4u::this_actor
-.. _API_s4u_Activity:
+API Reference
+*************
 
-=============
-s4u::Activity
-=============
+.. _API_s4u_simulation_object:
 
-.. doxygenclass:: simgrid::s4u::Activity
-   :members:
-   :protected-members:
-   :undoc-members:
+==================
+Simulation objects
+==================
 
 .. _API_s4u_Actor:
 
-==========
-s4u::Actor
-==========
+==============
+⁣  class Actor
+==============
+
+.. autodoxyclass:: simgrid::s4u::Actor
 
 .. doxygentypedef:: ActorPtr
 
 .. doxygentypedef:: aid_t
 
-.. doxygenclass:: simgrid::s4u::Actor
+Creating actors
+---------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. code:: C++
+
+         #include <simgrid/s4u/Engine.hpp>
+
+      .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, const std::function< void()> &code)
+      .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, F code)
+      .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, F code, Args... args)
+      .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, const std::string &function, std::vector< std::string > args)
+
+      .. autodoxymethod:: simgrid::s4u::Actor::init(const std::string &name, s4u::Host *host)
+      .. autodoxymethod:: simgrid::s4u::Actor::start(const std::function< void()> &code)
+
+   .. group-tab:: Python
+
+      .. code:: Python
+
+         from simgrid import Actor
+
+      .. automethod:: simgrid.Actor.create
+
+   .. group-tab:: C
+
+      .. code:: C
+
+         #include <simgrid/actor.h>
+
+      .. autodoxymethod:: sg_actor_init(const char *name, sg_host_t host)
+      .. autodoxymethod:: sg_actor_start(sg_actor_t actor, xbt_main_func_t code, int argc, char **argv)
+
+      .. autodoxymethod:: sg_actor_attach(const char *name, void *data, sg_host_t host, xbt_dict_t properties)
+      .. autodoxymethod:: sg_actor_detach()
+
+      .. autodoxymethod:: sg_actor_ref(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_unref(const_sg_actor_t actor)
+
+Searching specific actors
+-------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Actor::by_pid(aid_t pid)
+      .. autodoxymethod:: simgrid::s4u::Actor::self()
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Actor.by_pid
+      .. automethod:: simgrid.Actor.self
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: sg_actor_by_PID(aid_t pid)
+      .. autodoxymethod:: sg_actor_self()
+
+Querying info about actors
+--------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Actor::get_cname
+      .. autodoxymethod:: simgrid::s4u::Actor::get_name
+      .. autodoxymethod:: simgrid::s4u::Actor::get_pid
+      .. autodoxymethod:: simgrid::s4u::Actor::get_ppid
+      .. autodoxymethod:: simgrid::s4u::Actor::get_properties() const
+      .. autodoxymethod:: simgrid::s4u::Actor::get_property(const std::string &key) const
+      .. autodoxymethod:: simgrid::s4u::Actor::set_property(const std::string &key, const std::string &value) 
+
+      .. autodoxymethod:: simgrid::s4u::Actor::get_host
+      .. autodoxymethod:: simgrid::s4u::Actor::set_host
+
+      .. autodoxymethod:: simgrid::s4u::Actor::get_refcount()
+      .. autodoxymethod:: simgrid::s4u::Actor::get_impl
+
+   .. group-tab:: Python
+                  
+      .. autoattribute:: simgrid.Actor.name
+      .. autoattribute:: simgrid.Actor.host
+      .. autoattribute:: simgrid.Actor.pid
+      .. autoattribute:: simgrid.Actor.ppid
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: sg_actor_get_name(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_get_PID(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_get_PPID(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_get_properties(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_get_property_value(const_sg_actor_t actor, const char *name)
+
+      .. autodoxymethod:: sg_actor_get_host(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_set_host(sg_actor_t actor, sg_host_t host)
+
+      .. autodoxymethod:: sg_actor_data(const_sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_data_set(sg_actor_t actor, void *userdata)        
+
+Suspending and resuming actors
+------------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Actor::suspend()
+      .. autodoxymethod:: simgrid::s4u::Actor::resume()
+      .. autodoxymethod:: simgrid::s4u::Actor::is_suspended()
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Actor.resume
+      .. automethod:: simgrid.Actor.suspend
+      .. automethod:: simgrid.Actor.is_suspended
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: sg_actor_suspend(sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_resume(sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_is_suspended(sg_actor_t actor)
+
+Specifying when actors should terminate
+---------------------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Actor::kill()
+      .. autodoxymethod:: simgrid::s4u::Actor::kill_all()
+      .. autodoxymethod:: simgrid::s4u::Actor::set_kill_time(double time)
+      .. autodoxymethod:: simgrid::s4u::Actor::get_kill_time()
+
+      .. autodoxymethod:: simgrid::s4u::Actor::restart()
+      .. autodoxymethod:: simgrid::s4u::Actor::daemonize()
+      .. autodoxymethod:: simgrid::s4u::Actor::is_daemon
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Actor.kill
+      .. automethod:: simgrid.Actor.kill_all
+
+      .. automethod:: simgrid.Actor.daemonize
+      .. automethod:: simgrid.Actor.is_daemon
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: sg_actor_kill(sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_kill_all()
+      .. autodoxymethod:: sg_actor_set_kill_time(sg_actor_t actor, double kill_time)
+
+      .. autodoxymethod:: sg_actor_restart(sg_actor_t actor)
+      .. autodoxymethod:: sg_actor_daemonize(sg_actor_t actor)
+
+.. _API_s4u_Actor_end:
+
+Reacting to the end of actors
+-----------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Actor::on_exit
+      .. autodoxymethod:: simgrid::s4u::Actor::join()
+      .. autodoxymethod:: simgrid::s4u::Actor::join(double timeout)
+      .. autodoxymethod:: simgrid::s4u::Actor::set_auto_restart(bool autorestart)
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Actor.join
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: sg_actor_join(sg_actor_t actor, double timeout)
+      .. autodoxymethod:: sg_actor_set_auto_restart(sg_actor_t actor, int auto_restart)
+
+Signals
+-------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxyvar:: simgrid::s4u::Actor::on_creation
+      .. autodoxyvar:: simgrid::s4u::Actor::on_suspend
+      .. autodoxyvar:: simgrid::s4u::Actor::on_resume
+      .. autodoxyvar:: simgrid::s4u::Actor::on_sleep
+      .. autodoxyvar:: simgrid::s4u::Actor::on_wake_up
+      .. autodoxyvar:: simgrid::s4u::Actor::on_termination
+      .. autodoxyvar:: simgrid::s4u::Actor::on_destruction
+
+.. _API_s4u_this_actor:
+
+====================
+⁣  The current actor
+====================
+
+Static methods working on the current actor (see :ref:`API_s4u_Actor`).
+
+.. doxygennamespace:: simgrid::s4u::this_actor
+
+.. _API_s4u_Engine:
+
+====================
+⁣  Simulation Engine
+====================
+
+.. autodoxyclass:: simgrid::s4u::Engine
+
+Initialization
+--------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Engine::Engine(int *argc, char **argv)
+      .. autodoxymethod:: simgrid::s4u::Engine::is_initialized()
+      .. autodoxymethod:: simgrid::s4u::Engine::shutdown()
+      .. autodoxymethod:: simgrid::s4u::Engine::set_config(const std::string &str)
+
+      .. autodoxymethod:: simgrid::s4u::Engine::load_deployment(const std::string &deploy)
+      .. autodoxymethod:: simgrid::s4u::Engine::load_platform(const std::string &platf)
+      .. autodoxymethod:: simgrid::s4u::Engine::register_actor(const std::string &name)
+      .. autodoxymethod:: simgrid::s4u::Engine::register_actor(const std::string &name, F code)
+      .. autodoxymethod:: simgrid::s4u::Engine::register_default(int(*code)(int, char **))
+      .. autodoxymethod:: simgrid::s4u::Engine::register_function(const std::string &name, int(*code)(int, char **))
+      .. autodoxymethod:: simgrid::s4u::Engine::register_function(const std::string &name, void(*code)(std::vector< std::string >))
+
+   .. group-tab:: Python
+   
+       .. automethod:: simgrid.Engine.load_deployment
+       .. automethod:: simgrid.Engine.load_platform
+       .. automethod:: simgrid.Engine.register_actor
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: simgrid_init
+
+      .. autodoxymethod:: simgrid_load_deployment
+      .. autodoxymethod:: simgrid_load_platform
+      .. autodoxymethod:: simgrid_register_default
+      .. autodoxymethod:: simgrid_register_function
+
+Run the simulation
+------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Engine::get_clock()
+      .. autodoxymethod:: simgrid::s4u::Engine::run()
+
+   .. group-tab:: Python
+   
+      .. automethod:: simgrid.Engine.get_clock
+      .. automethod:: simgrid.Engine.run
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: simgrid_get_clock
+      .. autodoxymethod:: simgrid_run
+
+Retrieving actors
+-----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Engine::get_actor_count()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_all_actors()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_actors(const std::function< bool(ActorPtr)> &filter)
+
+   .. group-tab:: C
+
+      .. autodoxymethod:: simgrid_get_actor_count()
+
+Retrieving hosts
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Engine::get_all_hosts()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_host_count()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_hosts(const std::function< bool(Host *)> &filter)
+      .. autodoxymethod:: simgrid::s4u::Engine::host_by_name(const std::string &name)
+      .. autodoxymethod:: simgrid::s4u::Engine::host_by_name_or_null(const std::string &name)
+
+   .. group-tab:: Python
+
+      .. automethod:: simgrid.Engine.get_all_hosts
+
+Retrieving links
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Engine::get_all_links()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_link_count()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_links
+      .. autodoxymethod:: simgrid::s4u::Engine::link_by_name(const std::string &name)
+      .. autodoxymethod:: simgrid::s4u::Engine::link_by_name_or_null(const std::string &name)
+
+Interacting with the routing
+----------------------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxymethod:: simgrid::s4u::Engine::get_all_netpoints()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_netzones()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_instance()
+      .. autodoxymethod:: simgrid::s4u::Engine::get_netzone_root()
+      .. autodoxymethod:: simgrid::s4u::Engine::netpoint_by_name_or_null(const std::string &name)
+      .. autodoxymethod:: simgrid::s4u::Engine::netzone_by_name_or_null(const std::string &name)
+      .. autodoxymethod:: simgrid::s4u::Engine::set_netzone_root(const NetZone *netzone)
+
+Signals
+-------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. autodoxyvar:: simgrid::s4u::Engine::on_deadlock
+      .. autodoxyvar:: simgrid::s4u::Engine::on_platform_created
+      .. autodoxyvar:: simgrid::s4u::Engine::on_platform_creation
+      .. autodoxyvar:: simgrid::s4u::Engine::on_simulation_end
+      .. autodoxyvar:: simgrid::s4u::Engine::on_time_advance
+
+.. _API_s4u_Mailbox:
+
+================
+⁣  class Mailbox
+================
+
+Please also refer to the :ref:`full doc on s4u::Mailbox <s4u_mailbox>`.
+
+.. doxygenclass:: simgrid::s4u::Mailbox
    :members:
    :protected-members:
    :undoc-members:
+.. _API_s4u_Resource:
 
-.. _API_s4u_Barrier:
+=========
+Resources
+=========
 
-============
-s4u::Barrier
-============
+.. _API_s4u_Disk:
 
-.. doxygentypedef:: BarrierPtr
+=============
+⁣  class Disk
+=============
 
-.. doxygenclass:: simgrid::s4u::Barrier
+.. doxygenclass:: simgrid::s4u::Disk
    :members:
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_Comm:
 
-=========
-s4u::Comm
-=========
 
-.. doxygentypedef:: CommPtr
+.. _API_s4u_Host:
 
-.. doxygenclass:: simgrid::s4u::Comm
+=============
+⁣  class Host
+=============
+
+.. doxygenclass:: simgrid::s4u::Host
    :members:
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_ConditionVariable:
+.. _API_s4u_Link:
 
-======================
-s4u::ConditionVariable
-======================
+=============
+⁣  class Link
+=============
 
-.. doxygentypedef:: ConditionVariablePtr
+.. doxygenclass:: simgrid::s4u::Link
+   :members:
+   :protected-members:
+   :undoc-members:
 
-.. doxygenclass:: simgrid::s4u::ConditionVariable
+.. _API_s4u_NetZone:
+
+================
+⁣  class NetZone
+================
+
+.. doxygenclass:: simgrid::s4u::NetZone
    :members:
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_Disk:
+.. _API_s4u_VirtualMachine:
 
-============
-s4u::Disk
-============
+=======================
+⁣  class VirtualMachine
+=======================
 
-.. doxygenclass:: simgrid::s4u::Disk
+.. doxygenclass:: simgrid::s4u::VirtualMachine
    :members:
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_Engine:
+.. autodoxymethod:: sg_vm_create_core
+.. autodoxymethod:: sg_vm_create_multicore
+.. autodoxymethod:: sg_vm_get_name
+.. autodoxymethod:: sg_vm_get_pm
+.. autodoxymethod:: sg_vm_is_created
+.. autodoxymethod:: sg_vm_is_running
+.. autodoxymethod:: sg_vm_is_suspended
+.. autodoxymethod:: sg_vm_start
+.. autodoxymethod:: sg_vm_suspend
+.. autodoxymethod:: sg_vm_resume
+.. autodoxymethod:: sg_vm_shutdown
+.. autodoxymethod:: sg_vm_destroy
 
-===========
-s4u::Engine
-===========
+.. _API_s4u_Activity:
+
+==============
+class Activity
+==============
 
-.. doxygenclass:: simgrid::s4u::Engine
+.. autodoxyclass:: simgrid::s4u::Activity
+
+   **Known subclasses:**
+   :ref:`Communications <API_s4u_Comm>` (started on Mailboxes and consuming links),
+   :ref:`Executions <API_s4u_Exec>` (started on Host and consuming CPU resources)
+   :ref:`I/O <API_s4u_Io>` (started on and consumming disks).
+   See also the :ref:`section on activities <s4u_Activities>` above.
+
+Querying info about activities
+------------------------------
+
+   .. autodoxymethod:: simgrid::s4u::Activity::get_remaining()
+   .. autodoxymethod:: simgrid::s4u::Activity::get_state()
+   .. autodoxymethod:: simgrid::s4u::Activity::set_remaining(double remains)
+   .. autodoxymethod:: simgrid::s4u::Activity::get_impl
+
+Activities lifecycle
+--------------------
+
+   .. autodoxymethod:: simgrid::s4u::Activity::start
+   .. autodoxymethod:: simgrid::s4u::Activity::cancel
+   .. autodoxymethod:: simgrid::s4u::Activity::test
+   .. autodoxymethod:: simgrid::s4u::Activity::wait
+   .. autodoxymethod:: simgrid::s4u::Activity::wait_for
+   .. autodoxymethod:: simgrid::s4u::Activity::wait_until(double time_limit)
+
+.. _API_s4u_Comm:
+
+=============
+⁣  class Comm
+=============
+
+.. doxygentypedef:: CommPtr
+
+.. doxygenclass:: simgrid::s4u::Comm
    :members:
    :protected-members:
    :undoc-members:
 
 .. _API_s4u_Exec:
 
-=========
-s4u::Exec
-=========
+=============
+⁣  class Exec
+=============
 
 .. doxygentypedef:: ExecPtr
 
@@ -481,9 +888,9 @@ s4u::Exec
 
 .. _API_s4u_ExecSeq:
 
-============
-s4u::ExecSeq
-============
+==================
+⁣    class ExecSeq
+==================
 
 .. doxygentypedef:: ExecSeqPtr
 
@@ -494,9 +901,9 @@ s4u::ExecSeq
 
 .. _API_s4u_ExecPar:
 
-============
-s4u::ExecPar
-============
+==================
+⁣    class ExecPar
+==================
 
 .. doxygentypedef:: ExecParPtr
 
@@ -505,22 +912,11 @@ s4u::ExecPar
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_Host:
-
-=========
-s4u::Host
-=========
-
-.. doxygenclass:: simgrid::s4u::Host
-   :members:
-   :protected-members:
-   :undoc-members:
-
 .. _API_s4u_Io:
 
-=======
-s4u::Io
-=======
+===========
+⁣  class Io
+===========
 
 .. doxygentypedef:: IoPtr
 
@@ -529,59 +925,62 @@ s4u::Io
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_Link:
+.. _API_s4u_Synchronizations:
 
-=========
-s4u::Link
-=========
+=======================
+Synchronization Objects
+=======================
 
-.. doxygenclass:: simgrid::s4u::Link
-   :members:
-   :protected-members:
-   :undoc-members:
+.. _API_s4u_Barrier:
 
-.. _API_s4u_Mailbox:
+================
+⁣  class Barrier
+================
 
-============
-s4u::Mailbox
-============
+.. doxygentypedef:: BarrierPtr
 
-Please also refer to the :ref:`full doc on s4u::Mailbox <s4u_mailbox>`.
+.. autodoxyclass:: simgrid::s4u::Barrier
 
-.. doxygenclass:: simgrid::s4u::Mailbox
-   :members:
-   :protected-members:
-   :undoc-members:
+   .. tabs::
 
-.. _API_s4u_Mutex:
+      .. group-tab:: C++
 
-==========
-s4u::Mutex
-==========
+         .. autodoxymethod:: simgrid::s4u::Barrier::Barrier(unsigned int expected_actors)
+         .. autodoxymethod:: simgrid::s4u::Barrier::create(unsigned int expected_actors)
+         .. autodoxymethod:: simgrid::s4u::Barrier::wait()
 
-.. doxygentypedef:: MutexPtr
 
-.. doxygenclass:: simgrid::s4u::Mutex
+.. _API_s4u_ConditionVariable:
+
+==========================
+⁣  class ConditionVariable
+==========================
+
+.. doxygentypedef:: ConditionVariablePtr
+
+.. doxygenclass:: simgrid::s4u::ConditionVariable
    :members:
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_NetZone:
+.. _API_s4u_Mutex:
 
-============
-s4u::NetZone
-============
+==============
+⁣  class Mutex
+==============
 
-.. doxygenclass:: simgrid::s4u::NetZone
+.. doxygentypedef:: MutexPtr
+
+.. doxygenclass:: simgrid::s4u::Mutex
    :members:
    :protected-members:
    :undoc-members:
 
 .. _API_s4u_Semaphore:
 
-==============
-s4u::Semaphore
-==============
+==================
+⁣  class Semaphore
+==================
 
 .. doxygentypedef:: SemaphorePtr
 
@@ -590,22 +989,26 @@ s4u::Semaphore
    :protected-members:
    :undoc-members:
 
-.. _API_s4u_VirtualMachine:
 
-===================
-s4u::VirtualMachine
-===================
+C API Reference
+***************
 
-.. doxygenclass:: simgrid::s4u::VirtualMachine
-   :members:
-   :protected-members:
-   :undoc-members:
+==================
+Condition Variable
+==================
+
+See also the :ref:`C++ API <API_s4u_ConditionVariable>`.
 
+.. doxygenfunction:: sg_cond_init
+.. doxygenfunction:: sg_cond_notify_all
+.. doxygenfunction:: sg_cond_notify_one
+.. doxygenfunction:: sg_cond_wait
+.. doxygenfunction:: sg_cond_wait_for
 
 Python API Reference
 ********************
 
-The Python API is generated with pybind11. It closely mimicks the C++
+The Python API is automatically generated with pybind11. It closely mimicks the C++
 API, to which you should refer for more information.
 
 ==========
@@ -656,3 +1059,7 @@ Class Mailbox
 
 .. autoclass:: simgrid.Mailbox
    :members:
+
+.. |hr| raw:: html
+
+   <hr />